`
jzzwy
  • 浏览: 101790 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

yum -y update Couldn't resolve host 'mirrorlist.centos.org

阅读更多

yum clean all

当运行 "yum update"命令时出现如下错误提示(但ping URL却正常):

[root@viviotech ~]# yum -y update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base  

在google搜索资料后发现/etc/resolve.conf文件中

nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4  

为什么添加127.0.0.1到第1位置?yum更新时它核对第1个地址,所以从本地DNS服务器中来寻找"mirrorlist.centos.org",从而导致了如上错误信息的出现
想知道更多内容:

解决方法:

 

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 127.0.0.1  
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics