2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > yum使用时 could not resolve host 报错的解决方法

yum使用时 could not resolve host 报错的解决方法

时间:2024-05-31 00:04:10

相关推荐

yum使用时 could not resolve host 报错的解决方法

[root@cloudtest]#yumlist已加载插件:fastestmirror/centos/7/os/x86_64/repodata/repomd.xml:[Errno14]curl#6-"Couldnotresolvehost:;未知的错误"正在尝试其它镜像。Oneoftheconfiguredrepositoriesfailed(CentOS-7-Base-),andyumdoesn'thaveenoughcacheddatatocontinue.Atthispointtheonlysafethingyumcandoisfail.Thereareafewwaystowork"fix"this:1.Contacttheupstreamfortherepositoryandgetthemtofixtheproblem.2.Reconfigurethebaseurl/etc.fortherepository,topointtoaworkingupstream.Thisismostoftenusefulifyouareusinganewerdistributionreleasethanissupportedbytherepository(andthepackagesforthepreviousdistributionreleasestillwork).3.Runthecommandwiththerepositorytemporarilydisabledyum--disablerepo=base...4.Disabletherepositorypermanently,soyumwon'tuseitbydefault.Yumwillthenjustignoretherepositoryuntilyoupermanentlyenableitagainoruse--enablerepofortemporaryusage:yum-config-manager--disablebaseorsubscription-managerrepos--disable=base5.Configurethefailingrepositorytobeskipped,ifitisunavailable.Notethatyumwilltrytocontacttherepo.whenitrunsmostcommands,sowillhavetotryandfaileachtime(andthus.yumwillbebemuchslower).Ifitisaverytemporaryproblemthough,thisisoftenanicecompromise:yum-config-manager--save--setopt=base.skip_if_unavailable=truefailure:repodata/repomd.xmlfrombase:[Errno256]Nomoremirrorstotry.

如果使用 yum list 或者安装某文件时提示这种报错,host 解析有问题,请检查网络 DNS 设置,重启网络服务,OK

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