centos yum install Cannot find a valid baseurl for repo: base

CentOS 在從 yum install 同時收到以下這段錯誤訊息

Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
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

可以使用以下方式解決
Step1. 修改 "vi /etc/resolv.conf"

Step2. 加上 google 的 nameserver
# OpenDNS
nameserver 208.67.222.222
nameserver 208.67.220.220

# GoogleDNS
nameserver 8.8.8.8
nameserver 8.8.4.4


相關連結
https://www.centos.org/forums/viewtopic.php?t=8892

沒有留言:

張貼留言