Fix for – W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving ‘archive.ubuntu.com’

Problem: apt-get update gives an error :


W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving 'archive.ubuntu.com'

Reason: Name server is not configured correctly.

Solution : Use Google’s nameservers as below-


echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

 

Apt get should work now.

 

Leave a Reply

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

*

* Copy This Password *

* Type Or Paste Password Here *

62,357 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>