" temporary failure resolving 'us.archive.ubuntu.com' "
Err http://us.archive.ubuntu.com precise Release.gpg
Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg
Temporary failure resolving 'us.archive.ubuntu.com'
Anyway, after a bit of googling, I came across a helpful comment by fossfreedom from the UK, which can be found here. The solution was simple for me:
- Test to see if the problem is your DNS setting or an ISP issue. To do this type on the console: ping -n 8.8.8.8
- If produces replies you can stop it with Ctrl + C. This indicates that it is not an ISP problem so there is no point in calling them.
- Therefore, for me it was a DNS problem, which I have been having a lot of lately (likely due to my VPN usage). So I checked /etc/resolv.conf to see if I could find my DNS servers there. That's when I knew what my problem was. The file was empty, so I added the google DNS server.
- This was done through: echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
- After that, I just had to run the update via: sudo apt-get update