国内服务器在运行命令yum update 的时候,出现:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
这种错误,是因为没有配置/etc/resolv.conf。
解决方法:编辑resolv.conf文件,添加:
- nameserver 8.8.8.8
保存退出即可
最后记得service network restart
本文介绍了解决国内服务器使用yum update命令时遇到的问题:因未配置/etc/resolv.conf导致的镜像列表无法获取错误。通过编辑resolv.conf文件并添加Google DNS服务器地址8.8.8.8,可以有效解决该问题。
1万+

被折叠的 条评论
为什么被折叠?



