解决CentOS6 yum 源失效

装的CentOS6.5,测试项目的时候发现yum安装报错:

图片[1]-解决CentOS6 yum 源失效-小凡博客
Loaded plugins: fastestmirror, refresh-packagekit, security
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

直接改:

删除旧的:
rm -rf /etc/yum.repos.d/CentOS-Base.repo
添加新的:
vi /etc/yum.repos.d/CentOS-Base.repo
图片[2]-解决CentOS6 yum 源失效-小凡博客
[base]
name=CentOS-6
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.8/os/x86_64/
gpgcheck=0

完美解决。

© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片