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 have some head crunch issues with updating my Ubuntu 12.04 server system.
When I issue the following command (as root):

apt-get update

...nothing happens and after a while apt-get gives up with loads of errors like:

W: Failed to fetch  Unable to connect to

Below a copy of the stdout. Please note that I didn't wait for the command to finish and aborted it with CTRL-C to save some time

root@webserver:/var/log/apt# apt-get update
0% [Connecting to (]^C

This is how my sources.list looks like:

root@webserver:/var/log/apt# cat /etc/apt/sources.list
###### Ubuntu Main Repos
deb precise main restricted 
deb-src precise main restricted 

###### Ubuntu Update Repos
deb precise-security main restricted 
deb precise-updates main restricted 
deb-src precise-security main restricted 
deb-src precise-updates main restricted 

My /etc/apt.apt.conf is empty and no proxy is in use

root@webserver:/var/log/apt# cat /etc/apt/apt.conf
root@webserver:/var/log/apt# echo $http_proxy

root@web-octoplus01:/var/log/apt# echo $HTTP_PROXY


Using the US mirrors gives the same result. Special with the US mirrors is that every third try it suddenly works! (Only the address works, the rest results in the same errors)

root@web-octoplus01:/var/log/apt# host has address has address has address has IPv6 address 2001:67c:1562::15 has IPv6 address 2001:67c:1562::13 has IPv6 address 2001:67c:1562::14

Can it be that my server is on some inconsistent black-list at Ubuntu?
What do I not see?

share|improve this question
have you tried to use another server as source for your updates? – Alvar Sep 25 '13 at 14:16

Since the IPv4 version works, you can change the priority of the type of connection to the destination node from IPv6 to IPv4 in the /etc/gai.conf file (which controls the destination address selection).

uncomment the following in the document:

precedence ::ffff:0:0/96 100

As stated in the file, this way sites that prefer IPv4 connection can be connected with IPv4 instead of IPv6.

share|improve this answer

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.