Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just got a new VPS running Ubuntu 11.04 and tried to update it. I got this error. I get the same error whenever using apt-get

login as: root
root@'s password:
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-8-generic-pae i686)

 * Documentation:
Last login: Mon May  7 19:55:45 2012 from
root@Rx:~# apt-get update
Err natty-security InRelease

Err natty InRelease

Err natty-security Release.gpg
  Temporary failure resolving ''
Err natty-updates InRelease

Err natty Release.gpg
  Temporary failure resolving ''
Err natty-updates Release.gpg
  Temporary failure resolving ''
Reading package lists... Done
W: Failed to fetch

W: Failed to fetch

W: Failed to fetch

W: Failed to fetch  Temporary failure resolving ''

W: Failed to fetch  Temporary failure resolving ''

W: Failed to fetch  Temporary failure resolving ''

W: Some index files failed to download. They have been ignored, or old ones used instead.

If needed, here is my /etc/apt/sources.list

root@Rx:/etc# more /etc/apt/sources.list
deb natty main
deb natty-updates main
deb natty-security main
deb natty universe
deb natty-updates universe

And if needed, I did a ping test:

root@Rx:~# ping -n
PING ( 56(84) bytes of data.
64 bytes from icmp_req=1 ttl=56 time=13.3 ms
64 bytes from icmp_req=2 ttl=56 time=13.2 ms
64 bytes from icmp_req=3 ttl=56 time=13.4 ms
64 bytes from icmp_req=4 ttl=56 time=13.3 ms
--- ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 13.243/13.326/13.428/0.066 ms

This is /etc/resolv.conf

root@Rx:~# more /etc/resolv.conf
share|improve this question
This is a DNS problem. What's in your /etc/resolv.conf? – NathanG May 8 '12 at 2:26
@NathanG updated my question – Kevin Duke May 8 '12 at 2:29
Try adding a line in resolv.conf with nameserver – NathanG May 8 '12 at 2:37
@NathanG That did the trick! Want to make it an answer so I can accept? – Kevin Duke May 8 '12 at 2:40
I did get these messages when running apt-get upgrade cryptsetup: WARNING: failed to detect canonical device of /dev/xvda1 cryptsetup: WARNING: could not determine root device from /etc/fstab but otherwise it seems to work good – Kevin Duke May 8 '12 at 2:41
up vote 11 down vote accepted

The problem is that the DNS server you had originally isn't responding to your queries. You can add another one to the list to check. (provided by Google) is the easiest to remember.

Add the line nameserver to your /etc/resolv.conf to query that server.

If the original server is one that the VPS provider gave you, you may want to bring this up with their support team - it's possible there's some sort of management tool that depends on it. Other than that, you can use as your primary DNS forever.

share|improve this answer
I don't know much about this but the IP address of my VPS is different from the one in resolv.conf, is this a problem as well? – Kevin Duke May 8 '12 at 2:52
The address(es) in your /etc/resolv.conf are your DNS resolvers. They have little to no relation to the IP address of your server. – EEAA May 8 '12 at 2:53
> Add the line nameserver to your /etc/resolv.conf to query that server. sudoedit /etc/resolv.conf Thank you!!! This worked perfectly. – user138034 Sep 22 '12 at 16:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.