Linux 错误:找不到repo:base的有效baseurl
我需要一些帮助,我正在尝试在CentOS 5.9中安装Linux 错误:找不到repo:base的有效baseurl,linux,server,centos5,Linux,Server,Centos5,我需要一些帮助,我正在尝试在CentOS 5.9中安装yum update,但出现错误 > 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 wit
yum update
,但出现错误
> 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版本,我试图通过。并从自述文件中获取此信息 此目录(和CentOS版本)已弃用。对于普通用户, 在路径中应该使用/5/而不是/5.9/。请参阅此常见问题解答 关于CentOS发布计划: 如果你知道自己在做什么,并且绝对想保持在5.9 级别,转到以获取软件包。请记住,5.9不再获得任何更新 在这个链接中,它建议您通过另一个查找旧版本。因此,您需要修改CentOS Base.repo 替换所有
http://mirror.centos.org/centos/***
进入http://vault.centos.org/***
例如:
2。网络问题 检查
镜像列表服务器
是否可访问
$ ping mirrorlist.centos.org
如果您可能遇到下面的错误消息
ping: unknown host mirrorlist.centos.org
要解决此问题,请将有效的名称服务器添加到resolv.conf
(如果您不是root用户,请使用sudo)
这是因为Centos 5已弃用,需要手动更新基本回购文件才能将所有内容指向Centos vault 资料来源: 备份您的/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
我尝试ping,这是108-43-236-85.rev.customer-net.de(85.236.43.108)中的reulst 64字节:icmp_seq=2 ttl=53 time=364 msCan您能提供
/etc/yum.repos.d/CentOS Base.repo
的内容吗?repo可能太旧,因此您无法在mirrorlist服务器中找到它们。这是结果:[Errno 14]HTTP错误404:在尝试其他镜像时未找到。错误:无法检索存储库:base的存储库元数据(repomd.xml)。请验证其路径并重试。我不想获得更新。我只想下载一些应用程序运行所需的软件包,但它不允许me@jemz请尝试替换该链接,您当前的回购协议的baseurl没有为您提供正确的信息,您必须首先修复它们。非常感谢您的帮助性回答!同样适用于centos 4.8,您只需将$releasever替换为4.8,将mirror.centos.org/centos替换为vault.centos.org即可
$ echo nameserver 8.8.8.8 > /etc/resolv.conf
# 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