Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

For the last few days, when I run sudo apt-get update, it fails because some of the hosts cannot be resolved. However, I can ping them, so they definitely are getting resolved. My internet is working great. I also have that red ! in a triangle up in the corner.

Here is a sample of the output from apt-get:

steve@steve-ub:~$ sudo apt-get update
Ign trusty InRelease                                                                                 
Hit trusty Release.gpg                                                                               
Hit trusty Release                                                                                   
Hit trusty/main amd64 Packages                                                                       
Hit trusty/main i386 Packages                                                                        
Ign trusty/main Translation-en_US                                                                    
Ign trusty/main Translation-en                                                                       
Err precise InRelease                                                                            

Err precise Release.gpg                                                                          
  Could not resolve ''
Err trusty InRelease                                                                             

Err trusty InRelease                                                                                 

Err trusty InRelease                                                                             

I cut some of the output here, continuing later:

W: Failed to fetch  Could not resolve ''

W: Failed to fetch  Could not resolve ''

W: Failed to fetch  Could not resolve ''

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

And yet, I can ping the hosts that could not be resolved:

steve@steve-ub:~$ ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=49 time=59.8 ms


steve@steve-ub:~$ ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=56 time=20.8 ms

How can I get updates to work again?

share|improve this question
choose a different server from software and updates. – Avinash Raj Jun 18 '14 at 2:00
That has appeared to resolve all but Why, though? Those servers from the question are online... And since Steam doesn't work, I think if I knew that, I could fix Steam. – Steve Jun 18 '14 at 2:11
Why are you trying to use precise repos on trusty? – Registered User Jun 18 '14 at 7:13
If you're talking about the Steam repo, I don't believe they even have one for trusty. – Steve Jun 18 '14 at 14:12

If this is a remote server try adding Google DNS servers and see if that helps. On terminal:

sudo nano /etc/resolv.conf or nano /etc/resolv.conf

then add

nameserver nameserver

Exit selecting yes with cntrl x.

Run your update again. sudo apt-get update && sudo apt-get upgrade OR apt-get update && apt-get upgrade

share|improve this answer
I don't believe this would help - I was able to ping the servers that supposedly could not be resolved, and from the ping output in the question, you can see it resolve to an IP address. Also, thanks for the answer - this was resolved a long time ago when I obtained a new computer :) – Steve Oct 29 '14 at 12:53
@Steve, I was thinking the same but it did help. I added the Google DNS servers and apt-get works. – nitishch May 28 '15 at 15:00

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.