78模板网分享cms建站教程,提供网站模板、网站插件、办公模板等模板教程免费学习,找模板教程就上78模板网!

解决centos 6 更换yum 163源报错

http://mirrors.163.com/centos/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found”

Trying other mirror.

To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn’t help to resolve this issue please use https://bugs.centos.org/.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

解决方案

cd /etc/yum.repos.d

vi CentOS-Base.repo

:%s/$releasever/7/g #将文件中$releasever全部改成7

yum clean all && yum makecache # 清除和缓存

注意::%s/$releasever/7/g命令是在vi刚进去的模式下执行的,不是insert模式(对于新手可能不理解)

原因

原centos/6/ 以及以前的版本,已经没有相关的.xml文件,找不到所以才会报错(我们可以在浏览器中试一试就可以发现它,没有那个文件了)

centos7中有相关文件,将CentOS-Base.repo文件中的6改成7即可使用

这个问题查了好多博客都不能说明问题,困扰了好多个小时,在这时遇到了成功的曙光

本文链接:http://78moban.cn/post/9327.html

版权声明:站内所有文章皆来自网络转载,只供模板演示使用,并无任何其它意义!

联系技术
文章删除 友链合作 技术交流群
1050177837
公众号
公众号
公众号
返回顶部