Yum Error: Cannot find a valid baseurl for repo: base, yumrepo
Centos yum Error: Cannot find a valid baseurl for repo: addons installs CentOS 6.5. When using yum, the following Error message is displayed.
[Root @ localhost ~] # Yum install lrzsz
Loaded plugins: fastestmirror
Determining fastest mirrors
Cocould not retrieve than list http://mirrorlist.centos.org /? Release = 6 & arch = x86_64 & repo = OS error was
14: pycurl error 6-"Couldn't resolve host 'using list .centos.org '"
Error: Cannot find a valid baseurl for repo: base
Ping mirrorlist.centos.org and the ping fails. It is suspected that it is a dns setting problem. Ping www.ctohome.com also causes the error of unknown host www.ctohome.com. If you try it again, the ping will occasionally fail, indicating that the dns is indeed faulty. So, let's modify the dns Configuration:
Vi/etc/resolv. conf
Khan, found that vi is not available. Install vi? Yum cannot be used, so yum cannot install vi (how to install vi/vim using yum in linux/centos systems ?). What should we do?
Think about it. In fact, we just need to modify the/etc/resolv. conf file and directly use a dns server. We thought of the echo command:
Echo "nameserver 8.8.8.8">/etc/resolv. conf
Ping www.baidu.com. yum can be used! The first thing is to delete the problematic dns server in/etc/resolv. conf.