admin管理员组文章数量:1618715
yum安装时报错信息
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
http://ipv4.mirrors.ustc.edu/centos-altarch/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article
https://wiki.centos/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos/.
One of the configured repositories failed (CentOS-7 - Base),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=base ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable base
or
subscription-manager repos --disable=base
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=base.skip_if_unavailable=true
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://ipv4.mirrors.ustc.edu/centos-altarch/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
解决方法
1、查看linux上所有的yum包
rpm -qa|grep yum
2、逐个卸载,如
rpm -e yum-plugin-fastestmirror-1.1.31-34.el7.noarch --nodeps
3、查看自己需要的yum包
# cat /etc/redhat-release 查看系统版本
# file /bin/ls 查看系统位数
4、下载yum依赖,地址http://vault.centos
wget https://vault.centos/7.5.1804/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
wget https://vault.centos/7.5.1804/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget https://vault.centos/7.5.1804/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
wget https://vault.centos/7.5.1804/os/x86_64/Packages/yum-utils-1.1.31-45.el7.noarch.rpm
或者
curl -sO https://vault.centos/7.5.1804/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
curl -sO https://vault.centos/7.5.1804/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
curl -sO https://vault.centos/7.5.1804/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
curl -sO https://vault.centos/7.5.1804/os/x86_64/Packages/yum-utils-1.1.31-45.el7.noarch.rpm
5、 更新centos系统的repo文件,首先备份一下,免得误操作 /etc/yum.repos.d/CentOS-Base.repo
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
我的 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-$releasever - Base
mirrorlist=http://mirrorlist.centos/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
6、再依次运行以下命令生成缓存,执行命令后测试,就可以愉快的yum install了
yum clean all
yum makecache
本文标签: repomdXMLfailurerepodatamirrors
版权声明:本文标题:failure: repodatarepomd.xml from base: [Errno 256] No more mirrors to try. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1728783375a1173011.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论