使用yum命令安装的时候出错:yum localinstall --nogpgcheck *.rpm
错误如下:
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
vi /etc/resolv.conf
在此文件最后加入:nameserver xxx.xxx.xxx.xxx
如果没有vi编辑器可用:
echo "nameserver xxx.xxx.xxx.xxx" >>/etc/resolv.conf
然后pingwww.baidu.com
可以ping通,不会再出现unknow host
ok,安装依赖,
最后出现compelete即可