sudo apt-get upgrade results in 404 errors for everything

I'm running Ubuntu 18.04.1 LTS and I'm trying to update things on my system. I've tried running:

sudo apt-get update

Which produces a few 404 errors:

sudo apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release                                                           
Hit:3 https://packages.microsoft.com/repos/vscode stable InRelease                                                   
Hit:8 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease                                          
Hit:9 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu bionic InRelease                    
Get:5 http://us.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]                                                  
Get:7 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                          
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                             
Hit:10 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease                                             
Get:11 http://us.archive.ubuntu.com/ubuntu bionic/main i386 Packages [1,007 kB]                                      
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:21 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [295 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Ign:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Ign:47 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 Packages
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Ign:49 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB] 
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB] 
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Ign:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:78 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:79 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:80 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages      
Ign:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Ign:81 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages    
Ign:47 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 Packages
Ign:82 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
Ign:83 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:49 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:84 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages
Ign:85 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages
Ign:78 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages  
Ign:79 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Ign:80 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:81 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:47 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 Packages
Ign:82 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
Ign:83 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:49 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:84 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages
Ign:85 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages
Ign:78 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages  
Ign:79 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Err:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
  404  Not Found [IP: 91.189.88.149 80]
Ign:80 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:81 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:47 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 Packages
Ign:82 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
Ign:49 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:83 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:84 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages
Ign:78 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:85 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages
Err:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
  404  Not Found [IP: 91.189.91.23 80]
Ign:79 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:80 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:81 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Err:82 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
  404  Not Found [IP: 91.189.91.23 80]
Ign:83 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:84 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages
Ign:85 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages
Fetched 419 kB in 4s (104 kB/s)
Reading package lists... Done
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages  404  Not Found [IP: 91.189.91.23 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages  404  Not Found [IP: 91.189.91.23 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

Then sudo apt-get upgrade seems to think nothing exists:

tombot@Magma-Core-Kernel:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Also --fix-missing doesn't help. I've tried upgrading the distro with

sudo apt-get dist-upgrade

But this gives the same result as "sudo apt-get upgrade"

I'm able to ping 91.189.91.26 just fine:

ping 91.189.91.26
PING 91.189.91.26 (91.189.91.26) 56(84) bytes of data.
64 bytes from 91.189.91.26: icmp_seq=1 ttl=47 time=79.6 ms

I tried downloading a new sources.list file, but I still get:

Reading package lists... Done
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages  404  Not Found [IP: 91.189.91.23 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages  404  Not Found [IP: 91.189.91.26 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages  404  Not Found [IP: 91.189.91.26 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

Also, this is my first StackExchange post, so I hope I've done everything right with my post..

Thanks!


Solution 1:

The problem you're facing is basically a problem to reach the IP 91.189.91.26, try restarting your Internet connection and check if you can ping the IP address using this command:

ping 91.189.91.26

In my case it works correctly.

If nothing works for you, try changing the mirror your using to get your updates:

Open your sources.list file using your favorite text editor, in my case nano.

sudo nano /etc/apt/sources.list

Locate the text

http://us.archive.ubuntu.com/ubuntu

and replace it with

http://archive.ubuntu.com/ubuntu

And then run:

sudo apt update && sudo apt upgrade

If it still doesn't work, you might try a distribution update:

sudo apt-get dist-upgrade 

If still not working, this is what I've found here

Run the following command to update archive.ubuntu.com and security.ubuntu.com package repository URLs with old-releases.ubuntu.com. Since the normal Ubuntu releases link to the archive.XXX and security.XX URLs, the support will be removed after their live cycle of 9 months and respective repositories moved to old-releases.….

sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

Good luck.

.

Solution 2:

Partial answer...

From the comments...

The user is having problems updating their software repositories.

/etc/apt/sources.list and /etc/apt/sources.list.d/*.list files have been modified. They have references to a non-existent arm64 repo.

/etc/apt/sources.list has been replaced with a standard 18.04 version. The errors are decreased.

We're searching /etc/apt/sources.list.d/*.list files for "binary-arm64" errors now.

Update #1:

The new /etc/apt/sources.list has some wrong stuff. Do these to fix it...

sudo chown root:root /etc/apt/sources.list

sudo chmod 644 /etc/apt/sources.list

Then lets do a gross search for arm64...

sudo grep -r arm64 /etc/apt

Update #2:

Ubuntu was reinstalled, and everything is working fine again, including Virtualbox.