CentOS 7停止服务后yum源失效解决方法

Centos7 系统最近已经停止更新了,官方也把yum源也删除掉了,导致通过yum命令安装软件包都安装不了,会提示:“Could not resolve host: mirrorlist.centos.org; Unknown error”,本人也一直使用centos 7系统,现在停止服务了一点都不方便,现在分享一个解决方法,只需要更改yum源。

解决方法

登陆ssh 界面执行以下命令即可更换 yum 源为 CentOS 的 Vault 源(包括 CentOS 官方和阿里云的源)

wget -O /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.cccyun.cn/repo/Centos-7.repo
yum makecache

 

或者执行下面这条命令也行

curl -o /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.cccyun.cn/repo/Centos-7.repo
yum makecache

 

本站永久VIP限时特价9.9元开通

© 版权声明
THE END
打赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容