I an running into a common issue with trying to maintain and install packages for Ubuntu 20.04, with the following error being returned:
0% [Connecting to au.archive.ubuntu.com (2001:388:30bc:cafe::beef)]
So, first and foremost I just blamed IPv6
as the issue, so went to disable this with the following command:
sudo nano /etc/apt/apt.conf.d/99force-ipv4
Adding the value:
Acquire::ForceIPv4 "true";
Then I proceeded with the following to disable IPv6 on the system entirely:
sudo nano /etc/sysctl.d/99-sysctl.conf
Then added the following into the configuration file:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Then I re-loaded:
sudo sysctl -p
Then, I ran an apt update -y
to ensure my packages are updated. Here I an seeing that the repository IPv4 is now being shown, but I still cannot connect to it:
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Hit:2 https://apt.enpass.io stable InRelease
Hit:3 https://packages.cisofy.com/community/lynis/deb stable InRelease
Err:4 http://au.archive.ubuntu.com/ubuntu focal InRelease
Could not connect to au.archive.ubuntu.com:80 (202.158.214.106), connection timed out
Err:5 http://au.archive.ubuntu.com/ubuntu focal-updates InRelease
Unable to connect to au.archive.ubuntu.com:http:
Err:6 http://au.archive.ubuntu.com/ubuntu focal-backports InRelease
Unable to connect to au.archive.ubuntu.com:http:
So as far as I understand, I am being redirected to my nearest mirror that's being best-sourced for my system. How/is there a method wherein I can test to see the availability of the mirror, or even default to another location based on a failure to connect?
http://archive.ubuntu.com
or anyhttp://XX.archive.ubuntu.com
where XX=country code, in yoursources.list
– kortewegdevries Sep 12 '20 at 15:12