Yum update not working on CentOS 6.2 minimal install
Note: This is my first question on the stack exchange network so please give mercy and provide guidance where needed.
I have installed a CentOS 6.2 KVM guest and I am having problem getting yum to work. This is my first time working with CentOS so I feel that it's a setting somewhere that I am missing but cannot find using google.
Here are my steps;
- Downloaded CentOS-6.2-x86_64-minimal.iso, booted, and went through default steps (only questions asked where keyboard, timezone, root password and use entire hdd)
- Restarted, logged in, pinged google.com to no avail
- Set the following settings;
vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="52:54:00:42:1B:4A"
#NM_CONTROLLED="yes"
BOOTPROTO=none
ONBOOT="yes"
NETMASK=255.255.255.0
IPADDR=192.168.122.151
TYPE=Ethernet
vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server3.example.com
GATEWAY=192.168.122.1
- I can now ping google.com
ping google.com
PING google.com (173.194.70.139) 56(84) bytes of data.
64 bytes from fa-in-f139.1e100.net (173.194.70.139): icmp_seq=1 ttl=50 time=5.88 ms
64 bytes from fa-in-f139.1e100.net (173.194.70.139): icmp_seq=2 ttl=50 time=5.77 ms
- But I cannot 'yum update'
yum update
Loaded plugins: fastestmirror, presto
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 7 - "Failed to connect to 2a01:c0:2:4:216:3eff:fe0d:266d: Network is unreachable"
Error: Cannot find a valid baseurl for repo: base
My KVM guest is also NAT'd incase it's of concern.
Your system is finding an IPv6 address for mirrorlist.centos.org
in DNS and then failing to connect to it. Unless you actually have IPv6 connectivity, you should disable IPv6.
I have the same problem when I try install a VM with CentOS 6.3 using minimal install. I take some time to figure out that I was behind another CentOS as a firewall with proxy enable. All I have to do was apply some rules at the firewall to set this VM with free access to HTTP port.