您的位置:首页 > 其它

解决CenOS yum安装出现Could not retrieve mirrorlist

2013-11-15 13:05 561 查看
当yum -y install XXXX 出现如下问题:

23456789Loaded plugins:fastestmirror,refresh-packagekit,securityLoading mirror speeds from cached hostfileCould notretrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was14:PYCURL ERROR6-"Couldn't resolve host 'mirrorlist.centos.org'"Error:Cannot findavalid baseurl forrepo:base[root@chenyi yum.repos.d]# vi CentOS-Base.repo [root@chenyi yum.repos.d]# yum install rrdtool-*Loaded plugins:fastestmirror,refresh-packagekit,securityLoading mirror speeds from cached hostfile
原因:没有配置/etc/resolv.conf

解决方法:到/etc目录下配置resolv.conf加入nameserver IP,如:
123nameserver 8.8.8.8nameserver 8.8.4.4
search localdomain
保存再次运行上面命令就可以。更加详细:http://www.itchenyi.com/2382.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  error yum安装 CenOS
相关文章推荐