AI摘要
摘要卡片:
Centos 7停止维护,需要更换yum源。推荐更换为阿里云的源,以保证正常使用。具体操作包括备份原文件并下载阿里云源配置文件。使用sudo cp和sudo wget命令完成操作。当没有安装wget时,可使用curl命令完成。
centos7 已经停止维护了,现在yum在没有换源的情况下都用不了了。
这时候我们先换到aliyun的源,目前还可以用。
一、备份现有源文件:
sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
二、下载阿里云的源配置文件:
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
没有安装wget的时候用
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
三、清除缓存并生成新的缓存:
sudo yum clean all
sudo yum makecache
感谢您的来访,获取更多精彩文章请收藏本站。


THE END
暂无评论内容