技术频道导航
HTML/CSS
.NET技术
IIS技术
PHP技术
Js/JQuery
Photoshop
Fireworks
服务器技术
操作系统
网站运营

赞助商

分类目录

赞助商

最新文章

搜索

Cannot retrieve repository metadata (repomd.xml)

作者:admin    时间:2025-4-30 2:22:34    浏览:

 如果你在执行yum命令时返回报错信息:

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

那么,应该是域名失效了。

解决方法是:

修改 /etc/yum.repos.d/CentOS-Base.repo 这个文件,把域名 mirror.centos.org 改为 vault.centos.org

如果你用的是其他镜像源,例如aliyun的,那么同样把其域名改为 vault.centos.org ,这样就可以了。

标签: CentOS  linux技术  
x