美文网首页
Centos提示couldn't resolve hos

Centos提示couldn't resolve hos

作者: 格吾刚哥 | 来源:发表于2016-12-21 17:57 被阅读404次

    使用Centos进行yum安装的时候提示以下错误:

    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Courier; color: #28fe14; background-color: #000000; background-color: rgba(0, 0, 0, 0.9)}span.s1 {font-variant-ligatures: no-common-ligatures}
    Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
    14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
    错误:Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

    解决办法:

    vim /etc/resolve.cnf

    添加:

    nameserver 8.8.8.8 nameserver 202.106.0.20

    保存,重启网络服务即可。

    相关文章

      网友评论

          本文标题:Centos提示couldn't resolve hos

          本文链接:https://www.haomeiwen.com/subject/spiqvttx.html