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.

I am getting this error frequently while updating Ubuntu 12.04 LTS. How can I fix it? Log is:

Ign http://archive.scrapy.org precise/main Translation-en
Fetched 6,620 kB in 1min 21s (81.2 kB/s)
W: Failed to fetch http://archive.scrapy.org/ubuntu/dists/precise/Release.gpg
Something wicked happened resolving 'archive.scrapy.org:http' (-5 - No address associated with hostname)
share|improve this question

5 Answers 5

This has been a long term problem with apt, and Ubuntu has never fixed it. Apt doesn't seem to use the same DNS servers that the internal system does - 'ping ' returns a correct IP address. Apt-get claims that the hostname isn't found.

"Something wicked happened resolving 'extras.ubuntu.com:http" (Which sounds, somewhat, like it's trying to resolve a .com:http domain, which isn't a valid TLD)

To modify /etc/hosts, use the following:

Ping each of the names that are failing to resolve - PING extras.ubuntu.com (91.189.88.33) 56(84) bytes of data.

Use your favourite editor, such as vi - 'sudo vi /etc/hosts'.

Scroll down to the end, and add a line such as the following

91.189.88.33 extras.ubuntu.com  (with the appropriate name and IP address. IP is first) 

Save the file, then re-run apt-get. Once you've run apt-get, edit /etc/hosts again, and comment out the line with a hash mark - #. (or delete it entirely)

#91.189.88.33 extras.ubuntu.com

The reason to comment out/delete the line is that Ubuntu apparently shuffles their servers around randomly, and that might not be the correct IP the next time.

share|improve this answer

http://archive.scrapy.org/ seems like a perfectly working Ubuntu mirror, so while I'd usually ask you to provide information about what Software Sources are configured, it looks like this problem is either specific to your Ubuntu system, or was a short-lived problem with (or accessing) your DNS server. (The problem is not actually with the server at http://archive.scrapy.org/ itself, though it may have been due to a configuration problem for that server's DNS record.)

This is, of course, assuming that you have Internet access on the affected machine. If you don't, then you need to connect to the Internet before updating. It's quite normal to see errors like that if you don't have Internet access, or if your Internet connection itself is interrupted.

The problem may have gone away by itself. If not, you can try a different DNS server (8.8.8.8 and 8.8.4.4 are good public DNS servers operated by Google), and/or try a different mirror for updating Ubuntu.

share|improve this answer
1  
it's a short-lived problem when I update with apt-get update the error goes away. Will try google dns server. –  bernaulli May 28 '12 at 6:28

That hostname resolves to an Amazon EC2 instance. It's possible there was some transient issue which is now solved as it resolves fine here. Does it now work for you?

share|improve this answer

When I got this error, I put the IP address of the Ubuntu mirror in /etc/hosts. No more error. (When I queried the mirror in DNS there was never a problem or delay in response, so I'm not sure of the root cause of the error.)

share|improve this answer
2  
I recommend expanding this to explain in detail how to edit /etc/hosts in the way you recommend. –  Eliah Kagan Apr 5 '13 at 20:25

I got the "No address associated with hostname" message with Centos 6.5 when I said yes to IPv6 and apparently the ISP DHCP didn't have it. It solved the problem when I commented out the line in /etc/hosts:

# ::1     localhost6.localdomain6  localhost6
share|improve this answer

protected by Community Oct 15 at 6:59

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.