11

Possible Duplicate:
apt-get update fails to fetch files, “Temporary failure resolving …” error

I know this has been covered before, but I can't seem to resolve my issue. Here is my output.

jake@KUBIE-SERVER:~$ sudo apt-get update
Err http://us.archive.ubuntu.com precise InRelease

Err http://us.archive.ubuntu.com precise-updates InRelease

Err http://us.archive.ubuntu.com precise-backports InRelease

Err http://security.ubuntu.com precise-security InRelease

Err http://archive.canonical.com precise InRelease

Err http://ppa.launchpad.net precise InRelease

Err http://archive.canonical.com precise Release.gpg
  Temporary failure resolving 'archive.canonical.com'
Err http://ppa.launchpad.net precise Release.gpg
  Temporary failure resolving 'ppa.launchpad.net'
Err http://security.ubuntu.com precise-security Release.gpg
  Temporary failure resolving 'security.ubuntu.com'
Err http://us.archive.ubuntu.com precise Release.gpg
  Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com precise-updates Release.gpg
  Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com precise-backports Release.gpg
  Temporary failure resolving 'us.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/InRelease

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-        updates/InRelease

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-  backports/InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease

W: Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/InRelease

W: Failed to fetch     http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/precise/InRelease

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg    Temporary failure resolving 'us.archive.ubuntu.com'

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise- updates/Release.gpg  Temporary failure resolving 'us.archive.ubuntu.com'

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-  backports/Release.gpg  Temporary failure resolving 'us.archive.ubuntu.com'

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-  security/Release.gpg  Temporary failure resolving 'security.ubuntu.com'

W: Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/Release.gpg    Temporary failure resolving 'archive.canonical.com'

W: Failed to fetch   http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/precise/Release.gpg  Temporary  failure resolving 'ppa.launchpad.net'

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

Any help is greatly appreciated.

Jake Kubisiak
  • 111
  • 1
  • 1
  • 3
  • What have you tried so far? Do you have a working Internet connection on the computer where these errors are occurring? Are you connecting to the Internet through a proxy server or VPN? What is the output of ping -c 5 security.ubuntu.com? You can edit your question to provide all this information. – Eliah Kagan Jun 30 '12 at 11:32
  • If you are still using synaptic, you can just set your preferred repository from there, choose the main repository until your closest mirror can be reached again. – imrek May 02 '16 at 21:37

2 Answers2

6

I had the same error. I originally thought it was an error in /etc/apt/sources.list but after doing a ping of not only security.ubuntu.com but google.com as well, I found that my server was connecting to the network but not reaching outside the network.

I edited /etc/network/interfaces and set eth0 to DHCP rather than static. I then had my router take care of giving the server a static IP. Reboot the server and all working fine.

You can find out more about IP configurations here.

Peachy
  • 7,117
  • 10
  • 38
  • 46
  • Thank you sir... same issue. I guess its okay to edit your interfaces file or change your router settings, but not both – Geore Shg May 03 '16 at 04:31
4

You haven't specified any more details to the surrounding circumstances that might explain what's behind your issue.

Have it said, you seem to have some package management issues, probably due to the mirror that you are using, who may be missing or needing an update for the Precise packages that you're requesting.

Try this:

  1. Open the terminal and type:

    sudo nano /etc/apt/sources.list
    

    To edit your sources file.

  2. At the very beggining, add this lines:

    deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
    deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
    deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse
    deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse
    

    This should tell apt-get to automatically pick a mirror for you, based on your geographical location.

  3. Save the file and update your sources:

    sudo apt-get update
    

This assumes that you are not experiencing any internet connection or DNS problems.

Hope this helps.

Zuul
  • 1,974
  • Given all the DNS resolution failures, it's clear that in this case something is wrong with the Internet connection. – Eliah Kagan Jul 01 '12 at 06:25