300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > yum报错failure: repodata/repomd.xml from Centos: [Errno 256] No more mirrors to try. importing repomd.

yum报错failure: repodata/repomd.xml from Centos: [Errno 256] No more mirrors to try. importing repomd.

时间:2022-09-01 05:19:27

相关推荐

yum报错failure: repodata/repomd.xml from Centos: [Errno 256] No more mirrors to try. importing repomd.

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 - failovermethod=prioritybaseurl=/centos/7/os/$basearch//centos/7/os/$basearch/#mirrorlist=/?release=$releasever&arch=$basearch&repo=osgpgcheck=1gpgkey=/centos/RPM-GPG-KEY-CentOS-7#released updates[updates]name=CentOS-$releasever - Updates - failovermethod=prioritybaseurl=/centos/7/updates/$basearch//centos/7/updates/$basearch/#mirrorlist=/?release=$releasever&arch=$basearch&repo=updatesgpgcheck=1gpgkey=/centos/RPM-GPG-KEY-CentOS-7#additional packages that may be useful[extras]name=CentOS-$releasever - Extras - failovermethod=prioritybaseurl=/centos/7/extras/$basearch//centos/7/extras/$basearch/#mirrorlist=/?release=$releasever&arch=$basearch&repo=extrasgpgcheck=1gpgkey=/centos/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages[centosplus]name=CentOS-7 - Plus - failovermethod=prioritybaseurl=/centos/7/centosplus/$basearch//centos/7/centosplus/$basearch/#mirrorlist=/?release=$releasever&arch=$basearch&repo=centosplusgpgcheck=1enabled=0gpgkey=/centos/RPM-GPG-KEY-CentOS-7#contrib - packages by Centos Users[contrib]name=CentOS-$releasever - Contrib - failovermethod=prioritybaseurl=/centos/7/contrib/$basearch//centos/7/contrib/$basearch/#mirrorlist=/?release=$releasever&arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey=/centos/RPM-GPG-KEY-CentOS-7

保存退出输入

yum clean all yum makecache

即可

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。