• 欢迎访问小杰博客网站
  • 欢迎访问小杰博客网站哦

阿里云CentOs 6.4 yum报错Couldn’t resolve host’xx

未分类 小杰 7年前 (2016-11-23) 1315次浏览 已收录 0个评论

在centOs上安装软件时。提示报错信息:

Loaded plugins: security
http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrors.aliyun.com'”
Trying other mirror.
http://mirrors.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrors.aliyuncs.com'”
Trying other mirror.

原因

dns服务器没有配置正确

解决办法:

  1. 打开文件/etc/resolv.conf在其中添加:
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    search localdomain

  2. 然后重启网卡:使用命令: service network restart


小杰博客 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:阿里云CentOs 6.4 yum报错Couldn’t resolve host’xx
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址