APT hangs Debian 9 with update.
Not sure this is the right answer but I was getting a hang after the Debian updates and found it to be an issue with one of the links in /etc/apt/sources.list.d/mariadb.list. I moved this file to my home directory and suddenly it has apt cycles correctly.
philip@cetus:/# sudo apt update
Ign:1 http://mirrors.linode.com/debian stretch InRelease
Get:2 http://mirrors.linode.com/debian-security stretch/updates InRelease [94.3 kB]
Get:3 http://mirrors.linode.com/debian stretch-updates InRelease [91.0 kB]
Hit:4 http://mirrors.linode.com/debian stretch Release
Hit:5 http://apt-longview.linode.com stretch InRelease
Get:7 http://mirrors.linode.com/debian-security stretch/updates/main Sources [201 kB]
Hit:8 http://apt.afterlogic.com/stable InRelease
Get:9 http://mirrors.linode.com/debian-security stretch/updates/main amd64 Packages [508 kB]
Get:10 http://mirrors.linode.com/debian-security stretch/updates/main Translation-en [224 kB]
0% [Working]
[IT HANGS HERE]
5 Replies
Update… they all seem to stop on:
I removed:
/etc/apt/sources.list.d/mariadb.list
There seems to be something in this file that causes the hang.
@primalmedia I'm sorry to hear that you are having trouble updating the MariaDB. Sometimes, apt might try to update over IPv6. I don't see this message in the output you provided. However, to help rule this out, what happens when you add the -o flag to force IPv4?
apt-get -o Acquire::ForceIPv4=true update
I just ran into the exact same thing - moving the mariadb.list out of /etc/apt/sources.list.d/ allowed update to work
I just had the same issue with Debian 9.
It would simply hang here indefinitely:
root@localhost:~# apt update
0% [Connecting to mirrors.linode.com (2400:8907:1::ac69:a422)]^C
As suggested, I forced IPv4 with the below command and everything worked fine. Thanks for the suggestion.
root@localhost:~# apt -o Acquire::ForceIPv4=true update
Ign:1 http://mirrors.linode.com/debian stretch InRelease
Get:2 http://mirrors.linode.com/debian-security stretch/updates InRelease [94.3 kB]
Get:3 http://mirrors.linode.com/debian stretch-updates InRelease [91.0 kB]
Hit:4 http://mirrors.linode.com/debian stretch Release
Fetched 185 kB in 0s (705 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
All packages are up to date.
If you want to make it permanent then create the following text file;
/etc/apt/apt.conf.d/99force-ipv4
Then add the following line in to said file;
Acquire::ForceIPv4 "true";
Save file and then you should be set to simply update with the normal apt-get update or apt update and IPv4 will be used as default.