问题描述
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 FAQ
concerning the CentOS release scheme:
https://wiki.centos.org/FAQ/General
Please 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, nor
any security fix's.
The whole CentOS 6 is *dead* and *shouldn't* be used anywhere at *all*
问题解决
网站好不容易找到一个 Yum 源还能用,地址:https://vault.centos.org/6.9/
操作简单,把CentOS-Base.repo 里面的东西全部删掉,添加如下内容即可。
[base]
name=CentOS-6
failovermethod=priority
baseurl=https://vault.centos.org/6.9/os/x86_64/
gpgcheck=0
转载自:
作者:Binge
出处:http://www.cnblogs.com/binbingg/
本文版权归作者和博客园共有,转载必须给出原文链接,并保留此段声明,否则保留追究法律责任的权利