Wednesday, 6 April 2016

How to fix apt-get: Could not resolve 'archive.ubuntu.com'

If you are facing the issue, Could not resolve 'archive.ubuntu.com', you can fix them manually by appending a couple of lines in one of the files in Ubuntu. I have set up Ubuntu in Virtual Box and whenever I tried to install anything from ppa, I was getting this error of "Could not resolve archive.ubuntu.com".

You can fix this problem by changing a DNS address manually into the file /etc/resolv.conf to the free DNS entry provided by Google.

Before you follow the steps, sudo as a root user, and do not forget to back up your existing file. 

Navigate to /run/resolvconf.

Edit the file resolv.conf via vi resolv.conf and add this two lines in the starting of the file. 

nameserver 8.8.8.8
nameserver 8.8.4.4

Next time you wont face the problem of "Could not resolve archive.ubuntu.com". 

1 comment: