错误:无法找到回购有效的baseURL时:基地
我需要一些帮助,请,我试图在CentOS的5.9安装yum update
但我得到错误错误:无法找到回购有效的baseURL时:基地
> Loaded plugins: fastestmirror, kmod Loading mirror speeds from cached
> hostfile YumRepo Error: All mirror URLs are not using ftp, http[s] or
> file. Eg. Invalid release/ removing mirrorlist with no valid mirrors:
> /var/cache/yum/base/mirrorlist.txt Error: Cannot find a valid baseurl
> for repo: base
请帮我如何解决这个
的CentOS-Base.repo内
[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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=redhat-logos php53*
#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
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=redhat-logos php53*
#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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=redhat-logos php53*
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=redhat-logos php53*
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=5$releasever&arch=$basearch&repo=contrib
baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=redhat-logos php53*
的更新内容预先感谢您。
这可能是由两种可能性引起的。
1.回购太老了,找到你的CentOS版本
基地,我试图找到通过link操作系统。从自述文件中获取这些信息。
This directory (and version of CentOS) is deprecated. For normal users, you should use /5/ and not /5.9/ in your path. Please see this FAQ concerning the CentOS release scheme:
https://wiki.centos.org/FAQ/General
If you know what you are doing, and absolutely want to remain at the 5.9 level, go to http://vault.centos.org/ for packages. Please keep in mind that 5.9 no longer gets any updates
在此链接中,建议您通过另一个link找到旧版本。因此,您需要修改CentOS-Base.repo。
将所有http://mirror.centos.org/centos/***
替换为http://vault.centos.org/***
。
例如:
Original: baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
New: baseurl=http://vault.centos.org/$releasever/os/$basearch/
2.网络版本
检查mirrorlist server
是可访问的。
$ ping mirrorlist.centos.org
如果您可能遇到下面的错误消息。
ping: unknown host mirrorlist.centos.org
为了解决这个问题,添加有效域名服务器到resolv.conf
(使用须藤如果你不根用户)
$ echo nameserver 8.8.8.8 > /etc/resolv.conf
这是因为CentOS 5的已过时,需要基地回购文件的手动更新将所有内容指向Centos库。
来源:http://realtechtalk.com/Centos_59_Working_Vault_Repo_file-1921-articles
备份您的/etc/yum.repos.d/Centos-Base.repo
替换为以下将让你再次去:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-5.9 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=os
baseurl=http://vault.centos.org/5.9/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-5.9 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=updates
baseurl=http://vault.centos.org/5.9/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5.9 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=extras
baseurl=http://vault.centos.org/5.9/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5.9 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=centosplus
baseurl=http://vault.centos.org/5.9/os/$basearch/centosplus/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5.9 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=contrib
baseurl=http://vault.centos.org/5.9/os/$basearch/contrib/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
非常感谢您的有用答案! – SOUser
我试图ping,这是来自108-43-236-85.rev.customer-net.de(85.236.43.108)的reulst 64个字节:icmp_seq = 2 ttl = 53 time = 364 ms – jemz
您能否提供您的内容'在/ etc/yum.repos.d/CentOS的,Base.repo'?回购可能太旧,因此您无法在镜像列表服务器中找到它们。 –
这是http://vault.centos的结果。org/centos/5/os/x86_64/repodata/repomd.xml:[Errno 14] HTTP错误404:未找到 尝试其他镜像。 错误:无法检索存储库:base的存储库元数据(repomd.xml)。请验证它的路径,然后再试一次 – jemz