7

My Raspberry Pi 3 is having problems. When I try to run apt-get update, I get a 404 not found error. I am very new to Linux and I am not sure what is wrong.

Here is the error code:

pi@raspberrypi:~ $ sudo apt-get update
Ign http://mirrordirector.raspbian.org jessie InRelease
Ign http://archive.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease                            
Ign http://archive.raspbian.org jessie Release.gpg                             
--*cut*--

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/rpi/binary-armhf/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
pi@raspberrypi:~ $ 

My /etc/apt/sources.list file looks like this:

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

My /etc/apt/sources.list.d/raspi.list file looks like this:

deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspberrypi.org/debian/ jessie main ui

Please help. I can provide more information if necessary.

Note: Chromium, ping (from bash shell) is working.

Note: The sites that were not able to be fetched are not reachable from another computer using the same WiFi, (nor on the Raspberry Pi 3) e.g. http://mirrordirector.raspbian.org/raspbian/dists/jessie/non-free/binary-armhf/Packages gives a 404 Not Found Error.

https://superuser.com/a/1133746/1498871 has something about a EOL Debian version. Is this my problem?

I have tried a few of the Super User posts on this topic, but none of the solutions that I have tried have worked.

Raspbian GNU/Linux 8.0 (jessie) is the descriptor line from lsb_release -a.

2 Answers 2

5

Your version of Debian was obsoleted in 2017 or thereabouts. The Raspberry Pi Foundation doesn't support it anymore.

The simplest way is to start with the latest Raspberry Pi OS, reapply whatever changes you've made (I have a fairly simple set of instructions on serverfault on how I'd do it) and work from there.

Alternatively you could try upgrading the distro, but on single board computers, there's occasionally strangeness that you won't find on x86es, and it depends on the repos still being available.

If you have anything important on the SD card/install please back it up.

Then things get interesting. The 'previous' version of Raspbian is "Stretch". The current one is "Buster", the next one "Bullseye" is about to be released soon - you have Jessie.

In theory, if the repos are still up, you can modify your /etc/apt/sources.list and *.list files in /etc/apt/sources.list.d and replace jessie with stretch, do an apt update then an apt full-upgrade, then do it again, replacing stretch with buster (and soon in another step buster with bullseye) - doing it for one version is mentioned in the docs but jumping multiple versions isn't something I've seen people do - do it in steps. On the bright side, if things fail you have a backup and can work from there.

1
  • Just a heads up: bullseye is now released.
    – mteam88
    Sep 10, 2021 at 12:31
10

I ran into this same issue but didn't want to go through the work of upgrading versions, so simply updated the mirror link in my sources.list from mirrordirector.raspbian.org to legacy.raspbian.org

sources.list

deb http://legacy.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free

Method from this post where someone ran into the same issue using Wheezy - an even older Raspbian version.

3
  • 1
    I guess that's reasonable - but there's a point where keeping older versions around is counterproductive. That said, I have a bit of a bias from helping maintain an appliance with 8.04 as a base...
    – Journeyman Geek
    Sep 4, 2021 at 3:18
  • 2
    Seems to work... isn't the best solution though... In the future you will likely run into software compatability problems. Thank you for answering!
    – mteam88
    Sep 10, 2021 at 12:30
  • 100% Thanks - wish that was clearer to understand vs. a rug pull.
    – Mark
    Jan 20 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.