标签:
最近在安装MySQL的rpm包时,出现了一个问题,
当使用命令:
vim ./resolv.conf
时出现以下错误:
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn‘t resolve host ‘mirrorlist.centos.org‘"
Error: Cannot find a valid baseurl for repo: base
解决方法如下(修改dns配置)
vi /etc/resolv.conf
在此文件最后加入:nameserver 8.8.8.8
如果没有vi编辑器可用:
echo "nameserver 8.8.8.8" >>/etc/resolv.conf
然后ping www.baidu.com
可以ping通,不会再出现unknow host
ok,安装依赖,
yum install ld-linux.so.2
最后出现compelete即可
yum出错Error: Cannot find a valid baseurl for repo: base
标签:
原文地址:http://www.cnblogs.com/w10234/p/5633819.html