解决yum 命令出现 [Errno 14] curl#6 - "Couldn't resolve host ..."

分类:CentOS运维 阅读:40965 次

安装svn的时候,发现报错说一个地址无法访问。

# yum list | grep subversion

  1. http://opensource.wandisco.com/centos/7/svn-1.8/RPMS/x86_64/repodata/repomd.xml:[Errno14]curl#6-"Couldn'tresolvehost'opensource.wandisco.com'"
  2. 正在尝试其它镜像。
  3. Oneoftheconfiguredrepositoriesfailed(WandiscoSVNRepo),
  4. andyumdoesn'thaveenoughcacheddatatocontinue.Atthispointtheonly
  5. safethingyumcandoisfail.Thereareafewwaystowork"fix"this:
  6. 1.Contacttheupstreamfortherepositoryandgetthemtofixtheproblem.
  7. 2.Reconfigurethebaseurl/etc.fortherepository,topointtoaworking
  8. upstream.Thisismostoftenusefulifyouareusinganewer
  9. distributionreleasethanissupportedbytherepository(andthe
  10. packagesforthepreviousdistributionreleasestillwork).
  11. 3.Disabletherepository,soyumwon'tuseitbydefault.Yumwillthen
  12. justignoretherepositoryuntilyoupermanentlyenableitagainoruse
  13. --enablerepofortemporaryusage:
  14. yum-config-manager--disableWandiscoSVN
  15. 4.Configurethefailingrepositorytobeskipped,ifitisunavailable.
  16. Notethatyumwilltrytocontacttherepo.whenitrunsmostcommands,
  17. sowillhavetotryandfaileachtime(andthus.yumwillbebemuch
  18. slower).Ifitisaverytemporaryproblemthough,thisisoftenanice
  19. compromise:
  20. yum-config-manager--save--setopt=WandiscoSVN.skip_if_unavailable=true
  21. failure:repodata/repomd.xmlfromWandiscoSVN:[Errno256]Nomoremirrorstotry.
  22. http://opensource.wandisco.com/centos/7/svn-1.8/RPMS/x86_64/repodata/repomd.xml:[Errno14]curl#6-"Couldn'tresolvehost'opensource.wandisco.com'"
在域名服务器配置中,添加一个8.8.8.8,就解决了:
  1. #vi/etc/resolv.conf
  2. #GeneratedbyNetworkManager
  3. nameserver8.8.8.8
  4. nameserver211.155.23.88
  5. nameserver211.155.27.88