yum update Error: Cannot find a valid baseurl for repo: addons
yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError: <urlopen error (-3, ‘Temporary failure in name resolution’)>
Error: Cannot find a valid baseurl for repo: addons
ping mirrorlist.centos.org 发现ping不通
ping www.baidu.com 发现也ping不通
但是该服务器是能连接外网的,怀疑是dns设置问题
需要修改/etc/resolv.conf文件
也可以用echo命令:
echo "nameserver 8.8.8.8" >> /etc/resolv.conf