PYCURL ERROR 6 – “Couldn’t resolve host ‘dallas.tx.mirror.xygenhosting.com'”

Recently, one of our client ran into issue,where he could ping URL’s just fine, but when he ran the “yum update” command yum could not resolve anything. Getting error messages like the following:

[root@localhost ~]# yum update
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'"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=extras error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
 * base: bay.uchicago.edu
 * extras: centos.corenetworks.net
 * updates: centos-mirror.jchost.net

To resolve the error,Take a look at:

nano /etc/resolv.conf

Place the 8.8.8.8  and 8.8.4.4 entry at the bottom of the /etc/resolv.conf file, like so:

Generated by NetworkManager
nameserver 204.93.54.171
nameserver 8.8.8.8
nameserver 8.8.4.4

After that restart the network service:

service network restart

Issue this command in ssh:

yum clean all

After that everything worked fine.You can also check how to configure static IP in CentOS 6.5.

Leave a Reply

Your email address will not be published. Required fields are marked *