keyknight

执行yum makecache提示The requested URL returned error:

一,错误描述:  


1,执行yum makecache提示The requested URL returned error 4


[root@rac1 yum.repos.d]# yum makecache

Loaded plugins: security

https://mirrors.aliyun.com/centos/6Server/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"

Trying other mirror.



2,访问https://mirrors.aliyun.com/centos/6Server/os/x86_64/repodata/repomd.xml,得确不存在

但是存在 https://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml

和       https://mirrors.aliyun.com/centos/6.7/os/x86_64/repodata/repomd.xml


二、解决方法:


替换/etc/yum.repo.d/*.repo里面的错误的

https://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/

直接替换为

https://mirrors.aliyun.com/centos/6.7/centosplus/$basearch/


重新makecahe即可


评论