Today I will teach you how to fix PYCURL ERROR 6 – “Couldn’t resolve host ‘'”. This issue is most commonly encountered when trying to run the yum update command on a CentOS based distro with the following error log:

$ yum update
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: base
Could not retrieve mirrorlist error was
14: PYCURL ERROR 6 - "Couldn't resolve host ''"


To fix the error is quite easy, we just need to add Google Public DNS as a DNS resolver in the /etc/resolv.conf file. Add the following variables at the very bottom line of the /etc/resolv.conf file.


Then please try to reboot your server and run the system update command once again using the following command:

$ yum update
Previous articleHow To Install phpMyAdmin Manually on CentOS 7 with NGINX & PHP-FPM
Next articleHow To Change Hostname on Linux via Command-Line Interface (CLI)


Please enter your comment!
Please enter your name here
Captcha verification failed!
CAPTCHA user score failed. Please contact us!

This site uses Akismet to reduce spam. Learn how your comment data is processed.