Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have an Ubuntu 12.04 LTS Server, and I want to install the GUI, which causes error everytime. but before installing the GUI, I want to run the update command:

sudo apt-get update

But I always get this error:

It stuck at the "Connecting..." and then after some seconds it says failed and such.

Note that my nameservers are set to these:

What should I do?!

share|improve this question
It looks like a DNS issue. Are you able to browse the internet fine? Please post the output of this: nslookup and nslookup –  reverendj1 Oct 24 '12 at 16:44
both says: ;; connection timed out; no servers could be reached –  Michael Ropy Oct 24 '12 at 16:51

1 Answer 1

It sounds like you either have a network/connection issue or a DNS issue. First, try to ping (Google's DNS Server, as you already know)


If you get a response, we can tell that it is a DNS issue. If not, it is a network/connection issue.

For a DNS issue, make sure that you have set the DNS as described. Check /etc/network/interfaces. You should have a line in your network card stanza, like this:


Notice that the DNS servers are separated by a space, not a comma. A typical full stanza would look something like this:

iface eth0 inet static

After making the change, restart your networking service:

sudo /etc/init.d/networking restart

If that doesn't work, please post the contents of your /etc/network/interfaces config.

share|improve this answer
when I ping it, it only says: "PING ( 56(84) bytes of data." Nothing happens from then (actually nothing). I restarted my server and tested it again, its the same. Is it a Network issue?! What should I do? –  Michael Ropy Oct 24 '12 at 17:23
By the way I just edited my /etc/network/interfaces with your example. Still get the same error. –  Michael Ropy Oct 24 '12 at 17:38
It should say something along the lines of 64 bytes from icmp_req=1 ttl=55 time=37.3 ms. Yes, this is a network issue then. Can you ping your gateway, as defined in /etc/network/interfaces. –  reverendj1 Oct 24 '12 at 17:41
It says: Destination host Unreachable –  Michael Ropy Oct 24 '12 at 18:37
Yeah, you definitely have a networking issue. Check to make sure everything is plugged in and that you have blinking lights on your ethernet port, etc. –  reverendj1 Oct 24 '12 at 19:17

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.