FAST ACCESS

sysCore ApS
Tel: +45 32 21 57 70
Fax: +45 69 66 33 66
E-mail: info@syscore.dk
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
INNOVARE logo
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 http://mirror2.hs-esslingen.de precise InRelease
Get:1 http://mirror2.hs-esslingen.de precise Release.gpg [189 B]
Get:2 http://mirror2.hs-esslingen.de precise Release [1,394 B]
Get:3 http://mirror2.hs-esslingen.de precise/main Sources [887 B]
Get:4 http://mirror2.hs-esslingen.de precise/main amd64 Packages [3,280 B]
Get:5 http://mirror2.hs-esslingen.de precise/main i386 Packages [3,275 B]
Ign http://mirror2.hs-esslingen.de precise/main TranslationIndex
Ign http://mirror2.hs-esslingen.de precise/main Translation-en_US
Ign http://mirror2.hs-esslingen.de precise/main Translation-en
100% [Connecting to mirror.hetzner.de (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