Newbie question - Ubuntu 16.04 hang on apt-get update

Hello

I'm just setting up my Linode with Ubuntu 16.04 LTS, migrating from one of the main competitors ;) so forgive me if I'm missing something obvious. On pretty much the very first step, logged in as root via lish, I get a hang straight after the backports/universe Translation-en repository is attempted to be accessed, as follows:

[email protected]:~# apt-get update
Hit:1 http://mirrors.linode.com/ubuntu xenial InRelease
Get:2 http://mirrors.linode.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://mirrors.linode.com/ubuntu xenial-backports InRelease [102 kB]
Get:4 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 Packages [474 kB]
Get:5 http://mirrors.linode.com/ubuntu xenial-updates/main i386 Packages [466 kB]
                                                                                0% [4 Packages store 3,012 kB] [3 InRele
Get:6 http://mirrors.linode.com/ubuntu xenial-updates/main Translation-en [188 kB]
Get:7 http://mirrors.linode.com/ubuntu xenial-updates/restricted amd64 Packages [7,168 B]
Get:8 http://mirrors.linode.com/ubuntu xenial-updates/restricted i386 Packages [7,164 B]
Get:9 http://mirrors.linode.com/ubuntu xenial-updates/restricted Translation-en [2,396 B]
Get:10 http://mirrors.linode.com/ubuntu xenial-updates/universe amd64 Packages [396 kB]
Get:11 http://mirrors.linode.com/ubuntu xenial-updates/universe i386 Packages [392 kB]
Get:12 http://mirrors.linode.com/ubuntu xenial-updates/universe Translation-en [149 kB]
Get:13 http://mirrors.linode.com/ubuntu xenial-updates/multiverse amd64 Packages [8,080 B]
Get:14 http://mirrors.linode.com/ubuntu xenial-updates/multiverse i386 Packages [6,876 B]
Get:15 http://mirrors.linode.com/ubuntu xenial-updates/multiverse Translation-en [3,580 B]
Get:16 http://mirrors.linode.com/ubuntu xenial-backports/main amd64 Packages [4,672 B]
Get:17 http://mirrors.linode.com/ubuntu xenial-backports/main i386 Packages [4,660 B]
Get:18 http://mirrors.linode.com/ubuntu xenial-backports/main Translation-en [3,200 B]
Get:19 http://mirrors.linode.com/ubuntu xenial-backports/universe amd64 Packages [2,512 B]
Get:20 http://mirrors.linode.com/ubuntu xenial-backports/universe i386 Packages [2,508 B]
Get:21 http://mirrors.linode.com/ubuntu xenial-backports/universe Translation-en [1,216 B]
0% [Connecting to security.ubuntu.com (2001:67c:1562::16)]

It's been like that for about 15 minutes. Anything I'm doing wrong? This is Linode's out-of-the-box default Configuration Profile for Ubuntu 16.04 so I'd be surprised if any config file changes were needed, but happy to do them in order to get this to work. Thanks!

3 Replies

Actually, about 25 minutes later, it's just read all the repositories - I'm surprised at the very long hang though. apt-get upgrade seems to be working.

That tends to happen when you connect to security.ubuntu.com over IPv6. The official mirrors seem to have poor IPv6 connectivity from time to time.

If you don't have a pressing need to connect to everything over IPv6, you can edit /etc/gai.conf to tell Ubuntu to try IPv4 first.

@hybinet:

That tends to happen when you connect to security.ubuntu.com over IPv6. The official mirrors seem to have poor IPv6 connectivity from time to time.

If you don't have a pressing need to connect to everything over IPv6, you can edit /etc/gai.conf to tell Ubuntu to try IPv4 first.

I wasn't aware of the gai.conf thing, that seems like a good way to approach it, thanks hybinet.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct