Tuesday, November 12, 2013

Errors while updating and upgrading ubuntu server

I was getting whole bunch of errors while trying to update and upgrade Ubuntu server. 
apt-get install update
apt-get install upgrade

Result was whole bunch of erros.

But running the following command solved my issue.

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

It is likely that this issue is either:
  • temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or
  • due to a change in your network has similarly blocked this naming - for example, new router/modem, reconfiguring a switch with a new configuration.
Lets look at the possible DNS resolving issues.
First, temporarily add a known DNS server to your system.