Score:1

Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/focal-backports/main/binary-arm64/Packages 404 Not Found [IP: 185.125.190.39 80]

ky flag

Kind of getting to a good stage of using Linux. I am having a problem with updating my Ubuntu 20.04. Every time I run sudo apt update I get "file failed to fetch" error messages. I have tried modifying the source.list file but no luck. Would appreciate some help.

Example

Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/focal/main/binary-arm64/Packages  404  Not Found [IP: 185.125.190.39 80]

Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/focal-backports/main/binary-arm64/Packages  404  Not Found [IP: 185.125.190.39 80]
BeastOfCaerbannog avatar
ca flag
I just want to clarify that the file should be `sources.list`, not `source.list`. For the rest see Thomas' answer below.
Kenneth Shibaba avatar
ky flag
Hi. I saved it as sources.list. I entered that part wrongly. Sorry.
Score:2
ru flag

All arm64 packages ONLY exist on the ports.ubuntu.com repositories. Your errors are because you are using the standard archives - which only carry i386 and amd64 architechtures - and will be breaking.

Based on your comment indicating your system architecture is x86_64, you need amd64 packages, and NOT arm64 packages. Why your system is searching for ARM64 packages is beyond me, so we're going to fix that. So let's fix that problem first, because you shouldn't need arm64 packages on a standard install.

  1. Remove arm64 from foreign architectures that dpkg/apt looks for.

    sudo dpkg --remove-architecture arm64
    
  2. Reset your sources list back to previous.

    Use something like this:

    deb http://gb.archive.ubuntu.com/ubuntu focal main restricted universe multiverse
    #deb-src http://gb.archive.ubuntu.com/ubuntu focal main restricted universe multiverse
    deb http://gb.archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
    #deb-src http://gb.archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
    deb http://gb.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
    #deb-src http://gb.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
    deb http://gb.archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse
    #deb-src http://gb.archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse
    deb http://archive.canonical.com/ubuntu focal partner
    #deb-src http://archive.canonical.com/ubuntu focal partner
    

    (Note I commented out the deb-src lines, unless you're doing things like apt source calls or such you probably don't need them).

  3. Run sudo apt update again. You should see no more errors.

Kenneth Shibaba avatar
ky flag
Hi. Thank you for your kind response. I did that and this is what got : The repository 'http://ports.ubuntu.com/ubuntu focal 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. E: The repository 'http://ports.ubuntu.com/ubuntu focal-updates Release' does not have a Release file.
ru flag
I forgot to include updating `/ubuntu` to `/ubuntu-ports` - try updating that part as well and it should work.
Kenneth Shibaba avatar
ky flag
Hey Thomas. Do forgive me. Should I put it like this, deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted
Kenneth Shibaba avatar
ky flag
Updated it and this is what I got. E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal/main/binary-i386/Packages 404 Not Found [IP: 2620:2d:4000:1::19 80] E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/main/binary-arm64/Packages 404 Not Found [IP: 2001:67c:1562::15 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal-updates/main/binary-amd64/Packages 404 Not Found [IP: 2620:2d:4000:1::19 80] .
ru flag
@KennethShibaba See updated post, I added an example of what your sources.list should look like.
Kenneth Shibaba avatar
ky flag
Thank you very much for this help. I copied the exact example you showed and updated it in my sources list file. Unfortunately I am still getting the same error messages. I must say I did not comment any line out. I have backup sources list files in the etc/apt should I remove them?
ru flag
@KennethShibaba You have some weirdness in your system i believe. Your system is looking for amd64, i386, and arm64. WHat is the **actual** architecture on your system? `uname -i` for this info. There should not be any cases where you're mixing standard AMD64/i386 repos and ARM repos.
Kenneth Shibaba avatar
ky flag
Ithank you once again. totally agree. Its really weird. So after executing uname -i I got x86_64. I have a dual boot system as well
ru flag
Dual boot doesn't matter in this case. I've updated my answer completely now.
Kenneth Shibaba avatar
ky flag
Whaow! IT WORKED!! Oh my goodness. I am more than grateful. This has been a very educative experience for me. No errors. 350 packages can be upgraded. Guess I'd do that. Thank you Thomas.
ru flag
@KennethShibaba glad to hear it! Don't forget to hit the checkmark to accept this answer and mark the question as solved! :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.