|
|
|
|
|
如果你在執(zhí)行yum命令時(shí)返回報(bào)錯(cuò)信息:
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again.
例如:
[root@localhost ~]# yum upgrade
Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/ YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/ YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/ YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
* c5-media: http://mirror.centos.org/centos/5/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
那么,應(yīng)該是域名失效了。
解決方法是:
修改 /etc/yum.repos.d/CentOS-Base.repo
這個(gè)文件,把域名 mirror.centos.org
改為 vault.centos.org
。
如果你用的是其他鏡像源,例如aliyun的,那么同樣把其域名改為 vault.centos.org
,這樣就可以了。