Ubuntu server apt-get says "(-5 - No address associated with hostname)"
- by Srini
I have a ubuntu 12.04 server. Running sudo apt-get update on it produces errors like this:
W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/precise-backports/main/binary-i386/Packages Something wicked happened resolving 'au.archive.ubuntu.com:http' (-5 - No address associated with hostname)
I am able to ping all the other hosts on the network and also Google's DNS 8.8.8.8. But am unable to ping www.google.com.
So, I'm guessing something is wrong with my DNS setup, but not sure what.
I use static IP and my /etc/network/interfaces looks like this:
auto eth0
iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.0.255
gateway 192.168.1.1
#dns-nameserver 203.12.160.35 203.12.160.36
#nameserver 203.12.160.35 203.12.160.36
My /etc/resolv.conf and /etc/resolvconf/resolv.conf.d/base are both empty and my /etc/resolvconf/resolv.conf.d/original says:
nameserver 192.168.1.1
Any help would be greatly appreciated.
P.S. I've googled it a bit and the common resolution is to switch to DHCP which I don't want to do since this is my home server.
Thanks
Srini