分享

[原]linux安装软件时提示找不到镜像的问题:Couldn't resolve host 'mirrorlist.centos.org'

 KILLKISS 2014-06-08

问题:
[root@cddserver2 ~]# yum -y install gcc-*
Loaded plugins: fastestmirror, presto
Could not retrieve mirrorlist
http://mirrorlist./?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.'"
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

原因:
 dns服务器没有配置正确

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

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

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多