CentOS Yum Error Error:cannot find a valid baseurl for Repo:addons has a CentOS 6.5 and the following error message appears when using Yum.
[email protected] ~]# Yum install Lrzsz
Loaded Plugins:fastestmirror
Determining fastest Mirrors
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
Then ping mirrorlist.centos.org found the ping to be out of the way. The suspicion is a DNS setup issue. Ping www.ctohome.com also appears unknown host www.ctohome.com error. Try again and occasionally ping, indicating that DNS is indeed a problem. So, let's modify the DNS configuration:
Vi/etc/resolv.conf
Sweat, found VI also can not be used. Install VI? Yum is not available, so Yum installs VI (how does the Linux/centos system use Yum to install Vi/vim?). What do we do?
Thinking, in fact, we just need to modify the/etc/resolv.conf file, directly a DNS server can, think of the echo command:
echo "NameServer 8.8.8.8" >>/etc/resolv.conf
Done, ping www.baidu.com smooth, yum can use! The first thing to do is to remove the DNS server that has the problem in/etc/resolv.conf.
Yum Error Error:cannot find a valid baseurl for repo:base