RSS
 
 

CentOS 6.X yum does not work

16 Apr

I was recently working on a job that called for centOS.
not knowing what type of hardware the customer had, I opted to build a VM using i386.
Everything went fine until…


removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

or

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.

Trawling the internet found literally hundreds of similar problems related to the same issue, but none had a solution that worked.

So I gave up and tried to install the 64bit version of CentOS, and it worked fine, even allowing YUM to correctly update the install.

But then I changed something in the VM…..

I changed the IP address, and suddenly YUM was broken, but the computer was STILL connected to the internet and could Ping Google.com

[root@localhost ~]# ping google.com
PING google.com (74.125.71.113) 56(84) bytes of data.
64 bytes from hx-in-f113.1e100.net (74.125.71.113): icmp_seq=1 ttl=128 time=20.8 ms
64 bytes from hx-in-f113.1e100.net (74.125.71.113): icmp_seq=2 ttl=128 time=20.3 ms
64 bytes from hx-in-f113.1e100.net (74.125.71.113): icmp_seq=3 ttl=128 time=21.4 ms

So this proved the resolver and network were working correctly, but yum just would not work.

Next part of the experiment , I changed the VM ip address back to the same one I had used for installing, and magically YUM worked again.

Changed it to another one, and YUM would again not update.

So there is a possibility that all these people on the internet with non working YUM, have dynamic DHCP configured, and somehow the IP address is being changed when they reboot.

I need to look into this and find out if it is related to changing the IP address, but really it should not be.

HC

 
No Comments

Posted in Linux

 

Leave a Reply

 

*