24

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!

15
  • Have you modified /etc/apt/sources.list, or added any .list files into /etc/apt/sources.list.d?
    – heynnema
    Apr 4, 2019 at 21:05
  • Yes, I tried modifying sources.list as Philippe Delteil suggested.
    – TomBot
    Apr 4, 2019 at 21:35
  • It looks like you modified more that just what philippe suggested, yes? Did you make a backup of sources.list before you made any changes?
    – heynnema
    Apr 4, 2019 at 21:40
  • ...No ...oops. Those errors are from before I made the changes though.
    – TomBot
    Apr 4, 2019 at 21:42
  • Had you made changes to sources.list BEFORE philippe's changes? What kind of processor do you have, arm64? amd64? No backup of sources.list, correct?
    – heynnema
    Apr 4, 2019 at 21:46

5 Answers 5

15

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 you're using to get the 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.

8
  • 2
    I would like to upgrade from 18.04.1 to 18.04.2 to fix these problems, but that's not working because my repository is old? Seems like a catch 22, or rather, a catch 404 in this case.
    – TomBot
    Apr 4, 2019 at 20:42
  • The last solution is your only chance by now. Apr 4, 2019 at 20:45
  • Sorry, I get: Err:2 us.old-releases.ubuntu.com/ubuntu bionic InRelease Could not resolve 'us.old-releases.ubuntu.com' E: The repository 'old-releases.ubuntu.com/ubuntu bionic-security Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
    – TomBot
    Apr 4, 2019 at 20:50
  • it should be old-releases.ubuntu.com/ubuntu Apr 4, 2019 at 21:06
  • 3
    It works for me: sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
    – Neo Pham
    Jul 27, 2021 at 14:58
6

A slightly different solution; If this is happening when you build a docker Dockerfile with Ubuntu, using a command similar to docker build -t "localhost:5000/blahblah" . then it's due to the sources.list being cached and being obsolete. To fix this, use the no-cache switch, like so docker build --no-cache -t "localhost:5000/blahblah" ..

1

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.

5
  • Somehow... still no results from grep.
    – TomBot
    Apr 4, 2019 at 23:39
  • @TomBot Well, we've gotten rid of most of your errors, but these last 4 have me stumped. Somewhere it's finding "binary-arm64", but it's not in the normal places. So who knows where it's hiding. You might just have to reinstall Ubuntu to undo all of the changes in your system.
    – heynnema
    Apr 5, 2019 at 0:10
  • Yeah, I'm thinking of just reinstalling Ubuntu. Thanks for all the help! Should I change the status of this post somehow?
    – TomBot
    Apr 5, 2019 at 0:34
  • @TomBot lets wait until after you've reinstalled and got it working, then I'll update my answer.
    – heynnema
    Apr 5, 2019 at 2:30
  • A fresh install did the trick. Everything is working now. I'm able to install VirtualBox now, which is what I intended to do in the first place.. Thanks.
    – TomBot
    Apr 5, 2019 at 3:28
0

I haven't installed a ladder, so I met the 404,too. After I deselected checkboxes which is before 'http://us...' in 'Software & Updates' > 'Other Software', click button 'close' then 'reload', I could use sudo apt-get update with no error

0

For cross-compiling (e.g. arm64) on distributions that use backports, this solution is needed: https://askubuntu.com/a/1372223/412004.

WARNING: As a word of caution, this causes some unexpected issues with apt, please use with caution!

Quoting:

Yes, this is an ancient question, but the "got it to work" answer isn't correct.

sudo nano /etc/apt/sources.list

append these to the bottom of the file

deb [arch=arm64] http://ports.ubuntu.com/ focal main multiverse universe

deb [arch=arm64] http://ports.ubuntu.com/ focal-security main multiverse universe

deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main multiverse universe

deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main multiverse universe

Exit and save.

sudo dpkg --print-foreign-architectures

sudo dpkg --add-architecture arm64

sudo dpkg --print-foreign-architectures

You should now see arm64 in your list of foreign architectures

sudo apt-get update

You should see quite a few arm64 entries listed. There will be a few "404 not found" as repos move around. The problem is that many of the development packages for arm64 (notably libx11-dev) are in "ports"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .