centos 中yum错误修复

刚刚装了centos6.5要用yum安装东西结果发现yum不能解析域名

具错误体如下:

Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=$infra error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

一般不能解析域名的话都是域名服务器没配置对

解决办法 配置正确的域名信息,网上有提供一下解决方法

echo "nameserver 8.8.8.8" > /etc/resolv.conf

8.8.8.8是谷歌提供的一个域名服务器通常情况下都是可用的

配置完成之后立即就可以生效了

猜你喜欢

转载自robbiefeng.iteye.com/blog/2163418
今日推荐