Ploblem
I have a Ubuntu 11.10 server that I just installed fresh. Now if I try to do anything with apt-get, it tries to connect to archive.ubuntu.com .. It stays at [Connecting to archive.ubuntu.com (2001:67c:1360:8c01::1a)] phase for like 2 minutes, after which it actually starts to communicate and download stuff …
Eventually it always connects, but in waits at the [Connecting to archive.ubuntu.com (2001:67c:1360:8c01::1a)] phase everytime for like 2 minutes !
I didn’t have this problem previously on Ubuntu 11.10, right after reinstalling the OS ..
Any ideas on what the problem might be ?
Solution
I solved this on 12.10 by editing /etc/gai.conf and uncommenting the line:
# # For sites which prefer IPv4 connections change the last line to # precedence ::ffff:0:0/96 100
This lets you keep IPv6 enabled, but sets the order of precedence to prefer IPv4 over IPv6.
reference : http://askubuntu.com/questions/272796/connecting-to-archive-ubuntu-com-takes-too-long
![logo-ubuntu_st_no®-black_orange-hex[1]](http://nms.rmutp.ac.th/wp-content/uploads/2014/03/logo-ubuntu_st_no®-black_orange-hex1-300x212.png)