How to Fix the Error: “Could not resolve host … No address associated with hostname”

If you get this types of errors, telling you that a host could not be resolved, the problem is with your /etc/resolv.conf file.

'[Could not resolve host: ... No address associated with hostname]'

The easiest solution for this is to edit your /etc/resolv.conf file (with sudo or as root) and replace the nameserver lines with the following lines, which set the Google DNS servers:

nameserver 8.8.8.8
nameserver 8.8.4.4

Save the file, restart the network and you’re done:

$ sudo /etc/init.d/networking restart

Tagged with: , , , , , , ,
Posted in The Linux and Unix Articles!
One comment on “How to Fix the Error: “Could not resolve host … No address associated with hostname”
  1. Jaber Milano says:

    No address associated with hostname

Leave a Reply

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

*

Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!