[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"



http://mirror.centos.org/centos/%24releasever/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"

Trying other mirror.



首先说下yum源,使用的是163的源。http://mirrors.163.com/.help/CentOS6-Base-163.repo

[base]

name=CentOS-$releasever - Base - 163.com

baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

   配置好以后,直接yum clean all,没什么问题,接下来yum makecache的时候报错就出来了。

http://mirror.centos.org/centos/%24releasever/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"

Trying other mirror.

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

  网上说是因为DNS的问题,好吧,试了一下,没用啊,DNS改完也不行,ping源地址还是没问题,wget也没问题。再看看报错吧!http://mirror.centos.org/centos/%24releasever/os/i386/repodata/repomd.xml这个地址怎么成这样了呢?%24是神马东东,复制地址,到浏览器,果然是404错误,正常的源地址肯定不是这个,那么看一下配置文件吧,baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/

   $releaserver这个应该是系统的版本,那么我们看一下这个变量能不能解释吧,

[root@aaa ~]# echo $releasever

[root@aaa ~]#

 好吧,发现问题了吧,这个变量不能解释啊,试试将它换成网站上的6,看能不能行呢。



或者直接yum clean all就没问题了