今天在阿里云CentOS 6系统上使用yum命令时,突然出现404错误
http://mirrors.aliyun.com/epel/6/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 knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
解决方法如下
1、修改CentOS-Base.repo文件内容
cd /etc/yum.repos.d/
[base]
name=CentOS-6
failovermethod=priority
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/os/x86_64/
gpgcheck=0
2、修改epel.repo文件内容
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
enabled=1
failovermethod=priority
baseurl=http://mirrors.neusoft.edu.cn/epel/6/$basearch
gpgcheck=0
gpgkey=http://mirrors.neusoft.edu.cn/epel/RPM-GPG-KEY-EPEL-6
3、清理缓存
yum clean all
yum makecache
引起问题的原因
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*