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

I got an odd issue on the ubuntu12.04 when I ran sudo apt-get update command:

W: Failed to fetch
Something wicked happened resolving '****' (-5 - No address associated with hostname)

Here's my /etc/source.list:

deb precise main restricted
deb-src precise main restricted
deb precise-updates main restricted
deb-src precise-updates main restricted
deb precise universe
deb-src precise universe
deb precise-updates universe
deb-src precise-updates universe
deb precise multiverse
deb-src precise multiverse
deb precise-updates multiverse
deb-src precise-updates multiverse
deb precise-backports main restricted universe multiverse
deb-src precise-backports main restricted universe multiverse
deb precise-security main restricted
deb-src precise-security main restricted
deb precise-security universe
deb-src precise-security universe
deb precise-security multiverse
deb-src precise-security multiverse
deb precise main
deb-src precise main

And .basrc and /etc/apt/apt.conf content:

**Acquire::http::proxy "http://account:pwd@myproxy:3080/"**;

And /etc/resolve.conf:


I also added Google DNS server ip( to the ipv4 DNS configuration, but still failed. Anyone knows why?

share|improve this question
The source list looks strange, do you really have the spaces between h and ttp://? – January Jul 16 '13 at 9:41
It says you are behind a proxy... – Alvar Jul 16 '13 at 9:41
@January For new users there is a maximum number of links you're allowed to post and I suspect (given the reformatting required here) they were all showing as links before adding the space. – Oli Jul 16 '13 at 9:53
up vote 1 down vote accepted

I blame the proxy.

From here in the UK does not resolve but the mirror works fine. Stop using the proxy and things should start to work. I don't know why you'd want to use a Japanese proxy for a Chinese mirror anyway. Doesn't really make much sense.

If you're adamant you know what should resolve to, run sudoedit /etc/hosts in a terminal and add the following as a new line at the end of the file:
share|improve this answer
I work for a Japanese company and it's in the China. In the company i must use jp proxy to connect the network.The browser is ok by using this proxy, but the apt can not work...By a way,there is no space between the h and ttp:// – Harris Huang Jul 16 '13 at 10:20
i just modified this above proxy to, the update action is ok now, so DNS error cause this issue. i don't know how to configure the local dns... – Harris Huang Jul 16 '13 at 11:19
@HarrisHuang If you just want to add a record for this domain, you can do so by editing /etc/hosts. I have edited the answer to reflect this. – Oli Jul 16 '13 at 13:39
yeah, as you said, it's ok now. thanks for your help. – Harris Huang Jul 17 '13 at 3:22

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.