Fix apt upgrade error when connecting to fr.archive.ubuntu.comapt-get December 03, 2021
Recently, when trying to upgrade my tiny Ubuntu Server, got this error:
Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Cannot initiate the connection to fr.archive.ubuntu.com:80 (2001:bc8:1600:4:63f:72ff:feaf:a2de). - connect (101: Network is unreachable)
I thought that the issue was related to IPv6, so I disabled it:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
It should return 1 (disabled)
This didn’t help (also got error with IPv4)
W: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/focal/InRelease Could not connect to fr.archive.ubuntu.com:80 (18.104.22.168), connection timed out
So, after doing a ping to
fr.archive.ubuntu.com and confirming it’s down, just replaced it with
Finally packages upgrade is running
apt-get update apt upgrade
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.