技術(shù)頻道導(dǎo)航
HTML/CSS
.NET技術(shù)
IIS技術(shù)
PHP技術(shù)
Js/JQuery
Photoshop
Fireworks
服務(wù)器技術(shù)
操作系統(tǒng)
網(wǎng)站運(yùn)營

贊助商

分類目錄

贊助商

最新文章

搜索

Cannot retrieve repository metadata (repomd.xml)

作者:admin    時(shí)間:2025-4-30 2:22:34    瀏覽:

 如果你在執(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 ,這樣就可以了。

標(biāo)簽: CentOS  linux技術(shù)  
x