Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
Err http://archive.canonical.com natty InRelease    
Err http://security.ubuntu.com oneiric-security InRelease               
Err http://extras.ubuntu.com natty InRelease                            
Err http://security.ubuntu.com oneiric-security Release.gpg
  Temporary failure resolving ‘security.ubuntu.com’
Err http://archive.canonical.com natty Release.gpg
  Temporary failure resolving ‘archive.canonical.com’
Err http://extras.ubuntu.com natty Release.gpg
  Temporary failure resolving ‘extras.ubuntu.com’
Err http://gb.archive.ubuntu.com oneiric InRelease
Err http://gb.archive.ubuntu.com oneiric-updates InRelease
Err http://gb.archive.ubuntu.com natty-backports InRelease
Err http://gb.archive.ubuntu.com oneiric Release.gpg
  Temporary failure resolving ‘gb.archive.ubuntu.com’
Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg
  Temporary failure resolving ‘gb.archive.ubuntu.com’
Err http://gb.archive.ubuntu.com natty-backports Release.gpg
  Temporary failure resolving ‘gb.archive.ubuntu.com’

Reading package lists... Done
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease      
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease  
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease  
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease  
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease  
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease  
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’
W: Some index files failed to download. They have been ignored, or old ones used instead.

This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.

share|improve this question

8 Answers 8

up vote 24 down vote accepted

overview

There are two parts to your question:

  • fixing temporary resolve messages
  • fixing the package management issues

Temporary resolve

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.

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

Then run sudo apt-get update.

If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) - or you can permanently add a DNS server to your system:

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

8.8.8.8 is Google's own DNS server.

source

Another example DNS server you could use is OpenDNS - for example:

echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

package-management issues

In addition to the temporary resolve issues - you have a few package management issues that need to be corrected - I'm assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version - in your case from Natty (11.04) to Oneiric (11.10)

Open a terminal and type

sudo nano /etc/apt/sources.list

Look for lines that have your a different distribution name in the list than you were expecting - in your case - you have upgraded to oneiric but you have another release name natty

For example, look for lines that look like deb http:/archive.canonical.com/ natty backports

Add a # to the beginning of the line to comment it out - for example

#deb http:/archive.canonical.com/ natty backports

Save and re-run:

sudo apt-get update && sudo apt-get upgrade

You should not have any more release naming errors.

At the time of writing this, possible common release names include lucid, maverick, natty, oneiric, precise and quantal

share|improve this answer
    
Perfectly works :) –  Maduka Jayalath Nov 11 '12 at 13:22
    
When one name pops out during the update, you might skip the DNS fiddling and go directly to the sources list. –  SPRBRN Apr 24 at 15:11

“Temporary failure resolving …” means that your DNS, i.e. the translation from host names to IP addresses, is not working. Did you reconfigure something on your machine recently? If not, this may be a transient error at your ISP.

Does ping -n 8.8.8.8 show lines like 64 bytes from 8.8.8.8: …? (Press Ctrl+C to stop ping.)

  • If it doesn't, you specifically have an IP connectivity problem. Run traceroute -n 8.8.8.8 and see where it stops: if it's in your home/office, check your networking equipment. If you can reach your ISP, complain to them.
  • If it does, you specifically have a DNS problem. Check the contents of /etc/resolv.conf; there should be a line like nameserver 1.2.3.4 (possibly more than one of them). If the lines are there, there is probably a transient problem within your ISP, and you may be able to work around it by adding nameserver 8.8.8.8 to that file (this declares an extra DNS server, which is provided free of charge by Google).
share|improve this answer

You can comment the unresolved repo from the file sources.list found on dir /etc/apt/

After modifying the sources.list, clean the apt-get repo as

apt-get clean

Then update

apt-get update

The error will gone away

share|improve this answer

Sometimes, when you are behind a proxy server, it is even necessary, that you generate a apt.conf file in /etc/apt/ and fill it with the specific entries, like:

Acquire::http::proxy "http://<yourproxyserver>:<Port>";
Acquire::https::proxy "http://<yourproxyserver>:<Port>";
Acquire::ftp::proxy "http://<yourproxyserver>:<Port>";

If there is an authentification required, the config file looks like:

Acquire::http::proxy "http://<domain\user>:<password>@<yourproxyserver>:<Port>";
Acquire::https::proxy "http://<domain\user>:<password>@<yourproxyserver>:<Port>";
Acquire::ftp::proxy "http://<domain\user>:<password>@<yourproxyserver>:<Port>";
share|improve this answer

I experienced similar errors when running apt-get commands. It turns out I had the Software Update Panel open on the console.
This seemed to be blocking the command line apt-get, but I'm not certain.

share|improve this answer

This is a DNS problem. Check your /etc/resolv.conf file.

for example in my case when i had this problem & checked this file , the file was empty! but it should contains your dns-nameserver

mine:

nameserver 192.168.10.x

192.168.10.x is my gateway ip address

share|improve this answer
3  
Welcome to AskUbuntu! If you wanna help, make more verbose answer. I mean, cover most possible scenarios and ways to go or post link to appropriate tutorial. –  Danatela Jul 22 '13 at 8:19
1  
Could you clarify what one should check in /etc/resolv.conf? –  papukaija Jul 22 '13 at 9:01

I had this error. Following a tip from Linode support, I commented out all the IPv6 lines in /etc/hosts and then apt-get update started working.

share|improve this answer

For those who are using EC2, remember to check that your security group settings allow outbound connections to the websites you are updating from. You can set All traffic outbound setting and see if it works.

share|improve this answer

Your Answer

 
discard

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.