当前位置: 首页 >> Linux >> 【设置】CentOS6 YUM 源失效问题解决办法 >> 正文

【设置】CentOS6 YUM 源失效问题解决办法

3年前 (2021-04-15)     作者:Jiaozn     分类:Linux     阅读次数:3167     评论(0)    

问题描述

Yum 源失效,无法正常使用 Yum,错误信息如下:

复制代码
http://mirrors.aliyun.com/centos/6/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"尝试其他镜像。http://mirrors.aliyuncs.com/centos/6/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"尝试其他镜像。http://mirrors.cloud.aliyuncs.com/centos/6/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.cloud.aliyuncs.com'"尝试其他镜像。

问题分析

浏览器输入阿里的 Yum 源地址: mirrors.cloud.aliyuncs.com/centos/6

发现已经没有 updates 文件夹了,也找不到 repomd.xml 文件,所以 Yum 运行时报以上错误。

再查看 readme 文件,如下:

复制代码
This directory (and version of CentOS) is deprecated. Please see this FAQconcerning the CentOS release scheme:https://wiki.centos.org/FAQ/GeneralPlease keep in mind that 6.0, 6.1, 6.2, 6.3, 6.4 , 6.5, 6.6, 6.7, 6.8 , 6.9 and 6.10 no longer get any updates, norany security fix's.The whole CentOS 6 is *dead* and *shouldn't* be used anywhere at *all*

看明白了吧,The whole CentOS 6 is dead and shouldn't be used anywhere at all ,阿里已不再维护 CentOS 6 的 Yum 源镜像啦。

同样的,浏览器输入清华的 Yum 源地址:mirrors.tuna.tsinghua.edu.cn/centos/6,里面只有一个 readme 文件,内容和上面一样,说明清华已不再维护 CentOS 6 的 Yum 源镜像啦。

还有就是 163 也一样的结果,都只有一个 readme 文件啦。

问题解决

网站好不容易找到一个 Yum 源还能用,地址:https://vault.centos.org/6.9/
操作简单,把CentOS-Base.repo 里面的东西全部删掉,添加如下内容即可。

复制代码
[base]name=CentOS-6failovermethod=prioritybaseurl=https://vault.centos.org/6.9/os/x86_64/gpgcheck=0

替换完成后,执行如下两条命令:
yum clean all
yum makecache


除非注明,发表在“Jiaozn的博客”的文章『【设置】CentOS6 YUM 源失效问题解决办法』版权归Jiaozn所有。 转载请注明出处为“本文转载于『Jiaozn的博客』原地址https://www.jiaozn.com/reed/678.html
0

评论

发表评论   

昵称*

E-mail*(建议输入,以便收到博主回复的提示邮件)

网站

分享:

支付宝

微信