admin管理员组文章数量:1618702
yum报错failure: repodata/repomd.xml from Centos: [Errno 256] No more mirrors to try. importing repomd.
- yum依赖包报错
出现这个错误的原因是/etc/yum.repo.d/没有Centos-7.repo这个文件
在/etc/yum.repo.d/中创建CentOS-7.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-7 - Base - mirrors.aliyun
failovermethod=priority
baseurl=http://mirrors.aliyun/centos/7/os/$basearch/
http://mirrors.aliyuncs/centos/7/os/$basearch/
#mirrorlist=http://mirrorlist.centos/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.aliyun/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun
failovermethod=priority
baseurl=http://mirrors.aliyun/centos/7/updates/$basearch/
http://mirrors.aliyuncs/centos/7/updates/$basearch/
#mirrorlist=http://mirrorlist.centos/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirrors.aliyun/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun
failovermethod=priority
baseurl=http://mirrors.aliyun/centos/7/extras/$basearch/
http://mirrors.aliyuncs/centos/7/extras/$basearch/
#mirrorlist=http://mirrorlist.centos/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirrors.aliyun/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus - mirrors.aliyun
failovermethod=priority
baseurl=http://mirrors.aliyun/centos/7/centosplus/$basearch/
http://mirrors.aliyuncs/centos/7/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun/centos/RPM-GPG-KEY-CentOS-7
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun
failovermethod=priority
baseurl=http://mirrors.aliyun/centos/7/contrib/$basearch/
http://mirrors.aliyuncs/centos/7/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun/centos/RPM-GPG-KEY-CentOS-7
保存退出输入
yum clean all
yum makecache
即可
本文标签: 报错repodatarepomdyumfailure
版权声明:本文标题:yum报错failure: repodatarepomd.xml from Centos: [Errno 256] No more mirrors to try. importing repomd. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/xitong/1728784855a1173193.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论