Centos – installing dkms fails to work

centoscentos6virtual-machinesvirtualboxyum

I would like to install dkms to install the VBGuessAdditions but

yum install dkms

always results in an error

loaded pluggins: 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 – "Could not resoltve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo:base

Best Answer

Your DNS servers are broken. What do you have in /etc/resolv.conf? Replace it with something like this:

nameserver 8.8.8.8
nameserver 8.8.4.4

If that doesn't fix it, make sure you have outbound connectivity, and there's no iptables rules blocking things.