gpt4 book ai didi

linux - 存储库 : Cannot retrieve repository metadata (repomd. 错误 : base. xml) 请验证其路径并重试

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:15:06 27 4
gpt4 key购买 nike

我对 yum update httpd 有疑问

我的服务器是 CentOS 5.11

我收到这个错误:

[root@pbx5 ~]# yum install httpd
Loaded plugins: kmod
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
http://vault.centos.org/5.11/os/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
[root@pbx5 ~]#

这里是我的仓库 CentOS-Base.repo

name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://vault.centos.org/5.11/os/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://vault.centos.org/5.11/extras/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

请帮帮我。谢谢。

最佳答案

[base]中评论镜像列表:

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://vault.centos.org/5.11/os/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

并检查 vault.centos.org 是否正确解析:

$ dig +short vault.centos.org
109.72.83.61

如果没有解决,尝试手动添加记录:

echo "109.72.83.61 vault.centos.org" >> /etc/hosts
yum clean all && yum makecache

关于linux - 存储库 : Cannot retrieve repository metadata (repomd. 错误 : base. xml) 请验证其路径并重试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53562691/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com