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.

Problem Description:

Each time i try to download the updates for my operating system (Ubuntu 12.04) i get the following list of error messages:

W:Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg  Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname)
, W:Failed to fetch http://ppa.launchpad.net/deluge-team/ppa/ubuntu/dists/precise/Release.gpg  Something wicked happened resolving 'ppa.launchpad.net:http' (-5 - No address associated with hostname)
, W:Failed to fetch http://packages.medibuntu.org/dists/precise/Release.gpg  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
, W:Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/Release.gpg  Something wicked happened resolving 'archive.canonical.com:http' (-5 - No address associated with hostname)
, W:Failed to fetch http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/precise/Release.gpg  Something wicked happened resolving 'ppa.launchpad.net:http' (-5 - No address associated with hostname)
, E:Some index files failed to download. They have been ignored, or old ones used instead.

The Contents of (/etc/apt/sources.list) File:

# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu precise main restricted
deb-src http://archive.ubuntu.com/ubuntu precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu precise-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu precise universe
deb-src http://archive.ubuntu.com/ubuntu precise universe
deb http://archive.ubuntu.com/ubuntu precise-updates universe
deb-src http://archive.ubuntu.com/ubuntu precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu precise multiverse
deb-src http://archive.ubuntu.com/ubuntu precise multiverse
deb http://archive.ubuntu.com/ubuntu precise-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.

deb http://archive.ubuntu.com/ubuntu precise-security main restricted
deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted
deb http://archive.ubuntu.com/ubuntu precise-security universe
deb-src http://archive.ubuntu.com/ubuntu precise-security universe
deb http://archive.ubuntu.com/ubuntu precise-security multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
# deb-src http://extras.ubuntu.com/ubuntu precise main

The Files inside of (/etc/apt/sources.list.d) directory:

-rw-r--r-- 1 root root 136 Oct 10 16:30 deluge-team-ppa-precise.list    
-rw-r--r-- 1 root root 136 Oct 10 16:30 deluge-team-ppa-precise.list.save         
-rw-r--r-- 1 root root 285 Oct 10 16:30 medibuntu.list        
-rw-r--r-- 1 root root 285 Oct 10 16:30 medibuntu.list.save          
-rw-r--r-- 1 root root 132 Oct 10 16:30 tualatrix-ppa-precise.list         
-rw-r--r-- 1 root root 134 Oct 10 16:30 tualatrix-ppa-precise.list.save          
-rw-r--r-- 1 root root 148 Oct 10 16:30 yannubuntu-boot-repair-precise.list       
-rw-r--r-- 1 root root 148 Oct 10 16:30 yannubuntu-boot-repair-precise.list.save  

Related Links to this Post on AskUbuntu.com:

Server error (-5 - No address associated with hostname)
How to fix "-5 No address associated with hostname error" while updating?

I have tried to research online for ways to solve the issue but i failed to figure out the real reason why i am getting those errors. Any suggestions, ideas or solutions that might aid me to solve this issue are greatly appreciated.

share|improve this question
2  
All answers on this thread didn't work out for me. I had to try this answer from another thread. –  IsaacS Oct 7 '13 at 22:09
    
I had the same problem and was able to resolve it following the comment above –  Anh Nov 29 '13 at 21:36

5 Answers 5

up vote 4 down vote accepted

The solution to this problem goes as follows:

Step 1: Go to System –> Preferences –> Network Connections.

Step 2: Next, select your default Network Interface (eth0) and click ‘Edit’.

Step 3: Then select ‘IPv4 Settings’ and choose ‘Automatic (DHCP) addresses only’.

Step 4: Next, enter the new DNS server addresses in the ‘DNS servers’ box. Use commas to separate multiple addresses and click ‘Apply’ to save.

Step 5: Choose your preferred DNS details

OpenDNS           --->  208.67.222.222, 208.67.220.220              
Google Public DNS --->  8.8.8.8, 8.8.4.4                 
Comodo Secure DNS --->  156.154.70.22, 156.154.71.22

After configuring, check to make sure it is working by going online.

For full step-by-step tutorial for solving similar problems please check:
http://www.liberiangeek.net/2010/08/change-dns-information-ubuntu-10-04-lucid-lynx/

The above link explains how to change the DNS Settings in Ubuntu.

share|improve this answer
    
hi! what if after configuring DNS, I cannot connect to internet since my computer is not directly connected to internet but via a network? –  Shawn Le Jun 2 at 12:51

I had this same problem and none of the above answers fixed it. I DO have it fixed now however. Turns out all I needed to do was go into terminal and type sudo apt-get update . After it finished running, my update manager refreshed, gave me a new list of items to update and then I clicked update and everything ran fine. Don't know if this will help anyone else, but I hope it does.

share|improve this answer
1  
"...this problem is ... a short-lived problem with (or accessing) your DNS server. (The problem is not actually with the server at archive.scrapy.org itself, though it may have been due to a configuration problem for that server's DNS record.)" Quotation from this answer. –  Gediminas Jeremiah Gudelis Jul 26 '13 at 17:46
cat /etc/apt/sources.list 

edit with

sudo gedit /etc/apt/sources.list

delete http://packages.medibuntu.org/

then run

sudo apt-get update
share|improve this answer

If you are getting only errors relating to packages.medibuntu.org, that repository has closed according to the official repo page on launchpad and these discussion threads.

Symptom:

W: Failed to fetch http://packages.medibuntu.org/dists/precise/Release.gpg  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/free/source/Sources  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/non-free/source/Sources  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/free/binary-amd64/Packages  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/non-free/binary-amd64/Packages  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/free/binary-i386/Packages  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/non-free/binary-i386/Packages  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/free/i18n/Translation-en_US  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/free/i18n/Translation-en  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/non-free/i18n/Translation-en_US  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

W: Failed to fetch http://packages.medibuntu.org/dists/precise/non-free/i18n/Translation-en  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)

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

Solution:

Command Line Method

  1. Remove medibuntu repo from your /etc/apt/sources.list.d directory: sudo rm /etc/apt/sources.list.d/medibuntu.list*
  2. Run sudo apt-get update
  3. (optional) If you still see errors after this, run grep -lir medibuntu /etc/apt/sources.list.d/ | xargs sudo rm, then try running step 2 again.

GUI Method

  1. Open Synaptic Package Manager (Press Super/Winkey then type Synaptic Package Manager and click the first app result that shows up named Synaptic Package Manager)
  2. In the app's menu, select Settings -> Repositories
  3. Select the Other Software tab, then scroll down and uncheck or remove all entries for packages.medibuntu.org (see screenshot)

    Synaptic Package Manager Other Software tab
  4. Click Close
  5. Click the Reload button in Synaptic Package Manager (runs apt-get update behind the scenes)
share|improve this answer

If you have a proxy, then this link has some answers.

Look at the Setting up apt-get to use a http-proxy section within the web page.

share|improve this answer
    
Welcome to Ask Ubuntu. Please elaborate in the procedure to answer this question. Please, don't provide just a link to the question. See How to Answer for more information. –  Braiam Aug 3 '13 at 1:19

protected by Community Mar 5 at 18:41

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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