Could not resolve host: mirrorlist.centos.org Centos 7

Could not resolve host: mirrorlist.centos.org; Unknown error

This indicates that you either (a) don’t have a properly configured DNS server or (b) your network configuration isn’t correct and you can’t connect to a DNS server to check the hostname mirrorlist.centos.org.

Try using ping 8.8.8.8. If this fails, try ping <local-gateway-ip>. If that also fails, your local network configuration is wrong and you’ll have to check the configuration.

If you can ping 8.8.8.8, try using host, nslookup or dig to check the DNS settings like host google.com or dig google.com. If these fail, you need to check your DNS settings. Check /etc/resolv.conf to see what’s configured.

UPDATE

Since /etc/resolv.conf is blank, you need to setup a DNS resolver. I would suggest entering the following into the file using nano or vi (or whatever your comfortable using):

nameserver 9.9.9.9

Save this file, then try yum update again.

You can also try other DNS hosts if you would rather, such as 8.8.8.8 or 8.8.4.4 or any of the OpenDNS hosts.

Leave a Comment