Score:0

How to fix "Failed to fetch 404 Not Found [IP: ]"

jp flag

my Ubuntu Server 20.04 is running on a Raspberry Pi 4. Now for some reason I get the Error message: Failed to fetch <sources.list links> 404 Not Found [IP: <some_ip>]. I've tried some solutions but could not fix it.

Error Terminal Output (apt update):

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

My sources.list file: (I have updated this list from a solution of this platform)

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner

lsb_release -a output:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

uname -a output:

Linux ubuntu 5.4.0-1028-raspi #31-Ubuntu SMP PREEMPT Wed Jan 20 11:30:45 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

I will provide more information if needed and would be grateful for any support.

Greetings Finn


Before I tried to add a dpkg architecture with "dpkg --add-architecture i386". After reversing my actions with "dpkg --remove-architecture i386" everything worked just fine. Actually this raises another problem which is how to install SteamCMD on my server? I'm trying to install an ARK Server and regarding steam you have to run the command above. Maybe someone can help me furtherone. I would appreciate it.

Edit: aarch64 doesn't support x86 used by gameservers and the raspberry isn't even capable of handling a gameserver because of performance issues

finnizzda avatar
jp flag
I am just using the Kali default repository: "deb http://http.kali.org/kali kali-rolling main non-free contrib". I don't know if that will get me issues because the actual os is ubuntu not kali.
ru flag
yes, that will break your Ubuntu.
Score:0
ru flag

So you have a few problems going on.

Problem #1:

us.archive.ubuntu.com and the core Ubuntu repositories do NOT have the ARM repositories in them. So you need to adjust those lines in /etc/apt/sources.list so that they look like this (assuming you're using an arm64 machine, aarch64 from the kernel uname output means arm64 typically):

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

deb [arch=i386,amd64] http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb [arch=i386,amd64] http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb [arch=i386,amd64] http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse

This tells apt and dpkg which architectures are supported for each of the repositories. ALL of your arm64 binaries will be on ports.ubuntu.com. ALL of the i386 binaries will be on the main archives or security.ubuntu.com.


YOUR BIGGEST ISSUE - Problem 2: ARM does not speak x86 or x64!*

i386 and amd64 are for the x86 and x86_64 architectures respectively. Unfortunately, ARM processors do not have the capacity to speak x86 in any way.

You will be UNABLE to run Steam in any way, shape, or form on ARM64 hardware because Steam requires x86 / x86_64 to function. This will be the same for every i386 / amd64 software in the repositories - ARM is not able to be multiarched in this fashion.

Therefore, **you are better to simply revert your changes back to the ORIGINAL sources.list in your system, and then simply not attempt to get Steam or anything else installed that is x86 or x86_64 on your system.

If you need Steam or such, ARM is not a platform for it. You need a full amd64 system to work with Steam and the games on it, the RPi will not be a suitable replacement.


Problem #3: You indicated you're using the Kali repos now to 'make stuff work'

Guess what: your Ubuntu is no longer Ubuntu! Kali repos will overwrite Ubuntu stuff and turn your system into Kali! You need to reinstall your Ubuntu system to clean out the Kali stuff now, because it's hard embedded into your system now.

Otherwise, you're working with an evil nasty hybrid of Ubuntu and Kali, which makes it offtopic here on Ask Ubuntu.

finnizzda avatar
jp flag
Thanks a lot! Thats what I've done a little after posting this question. I think I have a better understanding of the souces.list file now.
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.