sysCore ApS
Tel: +45 32 21 57 70
Fax: +45 69 66 33 66
Glostrup, Denmark

Quick Product & Service Guide
Competences | Services | AppHost | Clip-card support | B2B SHOP | Online Presence Pack | RFID | sysAlarms
Google Apps for Business | WADA-NET | CLUB-NET

HCORE Skræddersyet webløsninger
Vi er en del af H|CORE
Autoriseret UNI-TEL forhandler

Autoriseret forhandler
Autoriseret NAVICAT forhandler

Autoriseret forhandler
sysCore Aps supports Foundation INNOVARE
meetBSD logo
sysCore Aps supports meetBSD Conference

Convince apt-get not to use IPv6 addressess

If suddenly noticed that your apt-get hangs on for example update command – and the line on which it is hanging resembles something like that:

Ign precise InRelease
Get:1 precise Release.gpg [189 B]
Get:2 precise Release [1,394 B]
Get:3 precise/main Sources [887 B]
Get:4 precise/main amd64 Packages [3,280 B]
Get:5 precise/main i386 Packages [3,275 B]
Ign precise/main TranslationIndex
Ign precise/main Translation-en_US
Ign precise/main Translation-en
100% [Connecting to (2a01:4f8:0:a101::1:1)]

This means your apt-get is trying to update itself and use IPv6 for that purpose. If you wish to force your system to always use IPv4, then add the following line into /etc/gai.conf file:

precedence ::ffff:0:0/96  100

That should fix the problem.

Posted in howto, linux | Tagged , , , | Comments Off on Convince apt-get not to use IPv6 addressess