red6.5更新163源提示错误

时间:2024-03-28 18:36:46

red6.5更新163源提示错误

Loaded plugins: fastestmirror, product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Determining fastest mirrors http://mirrors.163.com/centos/6Server/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found” Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

今天重装red hat 6.5
更新163yum源发现报错如下
red6.5更新163源提示错误

于是打开网站发现http://mirrors.163.com/centos/6Server/os/x86_64/repodata/repomd.xml

red6.5更新163源提示错误
这时候就扒开163的网站查找发现
http://mirrors.163.com/centos/6Server/os/x86_64/repodata/repomd.xml #是无法打开
http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml #猜测6Server逐级返回查找,找到了源网页地址

于是需要把CentOS-Base.repo中的$releasever全部修改为6

打开CentOS-Base.repo
vi CentOS-Base.repo
在末行模式下执行以下:
:%s/$releasever/6.4
Esc
-> Shift+: 进入末行模式
修改完保存退出:
Esc -> Shift+: -> wq

清理缓存
重新生成缓存
red6.5更新163源提示错误
更新完成!

相关文章