agupte
Posts: 52
Joined: Sun Oct 21, 2018 11:13 am

Rrepository for ... stretch Release "does not have a Release file"

Tue Sep 12, 2023 11:35 am

Over the last 3 days I have been getting the following response to

Code: Select all

sudo apt -y update
E: The repository 'http://raspbian.raspberrypi.org/raspbian stretch 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.

I have tried all the below repositories individually and in combination (in /etc/apt/sources.list):

Code: Select all

deb http://ftp.crifo.org/raspbian/raspbian/ stretch main contrib non-free rpi
deb http://mirror.ossplanet.net/raspbian/raspbian/ stretch main contrib non-free rpi
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
I have also tried removing, editing and then restoring /etc/apt/sources.list.d/raspi.list

I noticed too that http://raspbian.raspberrypi.org/raspbian/dists/stretch/ is an empty directory and the date of the directory's last modification shown in the directory listing is 3 days ago.

Is stretch no longer supported? That's a bummer because I will have to upgrade the OS on 30 odd production Raspberry Pis. And even if I do, will the new OS version work with just 1GB of RAM?

User avatar
rpdom
Posts: 23354
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Rrepository for ... stretch Release "does not have a Release file"

Tue Sep 12, 2023 11:51 am

agupte wrote:
Tue Sep 12, 2023 11:35 am
Is stretch no longer supported?
There have been a few posts on this subject.

Stretch has not actually been supported for years. However the repository still exists, but has moved to http://legacy.raspbian.org/raspbian/dists/stretch/ It will stay there for a very long time, but will not receive any updates.

So change your sources.list entry from

Code: Select all

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
to

Code: Select all

deb http://legacy.raspbian.org/raspbian/ stretch main contrib non-free rpi
Unreadable squiggle

agupte
Posts: 52
Joined: Sun Oct 21, 2018 11:13 am

Re: Rrepository for ... stretch Release "does not have a Release file"

Tue Sep 12, 2023 1:47 pm

Thank you! Appreciate the links too. Glad that there is some support left.

Do you (or anyone else) know if I should upgrade OSes? And how far up I should go on 1GB of RAM?

BigRedMailbox
Posts: 519
Joined: Sat Aug 20, 2022 10:37 pm

Re: Rrepository for ... stretch Release "does not have a Release file"

Tue Sep 12, 2023 1:52 pm

Everybody here (except me) will say "UPGRADE! UPGRADE! UPGRADE!" regardless of whether or not it is any way a good idea.

Well, in fact, what they will say is "NO, DON"T UPGRADE! INSTALL FRESH NEW AND LOSE ALL YOUR WORK. THE FUN IN COMPUTING IS STARTING OVER FROM SCRATCH EVERY YEAR OR SO".
My posts may be "controversial" and/or out-of-sync with the party line.

Nothing I write should in any way be taken as an official statement by any organization connected with (any branch of) RPi and/or any of its funding sources.

User avatar
rpdom
Posts: 23354
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Rrepository for ... stretch Release "does not have a Release file"

Tue Sep 12, 2023 4:32 pm

I tend to do a mix of fresh installs and upgrades, but I run Lite which has a lot less to go wrong on an upgrade than a full desktop system.

I would hold back for now. The newest Raspberry Pi OS - bookworm is probably going to be released fairly soon, so wait and install that on a fresh Card. Then copy your data over and install the apps.

I run (mostly) Bullseye Lite on everything from Pi 1B 256MB to Pi 400 4MB. It's a bit slow on the older machines, but usable for basic stuff and not that much different to the old OS.
Unreadable squiggle

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 33212
Joined: Sat Jul 30, 2011 7:41 pm

Re: Rrepository for ... stretch Release "does not have a Release file"

Tue Sep 12, 2023 4:50 pm

BigRedMailbox wrote:
Tue Sep 12, 2023 1:52 pm
Everybody here (except me) will say "UPGRADE! UPGRADE! UPGRADE!" regardless of whether or not it is any way a good idea.

Well, in fact, what they will say is "NO, DON"T UPGRADE! INSTALL FRESH NEW AND LOSE ALL YOUR WORK. THE FUN IN COMPUTING IS STARTING OVER FROM SCRATCH EVERY YEAR OR SO".
Upgrading between major releases is UNSUPPORTED BY RASPBERRY PI (You like caps I see). Whilst it can be done, there is no guarantee it will work. Doing a new install on a new SD does not lose all your work - just copy data from the old SD card. You will need to reinstall apps but at least this way will work.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Meet me and the Pi team at Embedded World in Nürnberg, April 9th-11th, 2024
Hall 3A Stand 138
https://events.raspberrypi.com/official/24d5151d-dd0f-483d-88a7-a5fddaa5c554

bjtheone
Posts: 2980
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: Rrepository for ... stretch Release "does not have a Release file"

Tue Sep 12, 2023 5:18 pm

BigRedMailbox wrote:
Tue Sep 12, 2023 1:52 pm
Everybody here (except me) will say "UPGRADE! UPGRADE! UPGRADE!" regardless of whether or not it is any way a good idea.

Well, in fact, what they will say is "NO, DON"T UPGRADE! INSTALL FRESH NEW AND LOSE ALL YOUR WORK. THE FUN IN COMPUTING IS STARTING OVER FROM SCRATCH EVERY YEAR OR SO".
As with everything, it depends.... If you are connected to the internet or running in an environment that requires security fixes to be applied, you should upgrade or may be contractually required to upgrade. If you are running a Pi as an appliance, unconnected to the outside world, if it is not broken, potentially leave it alone, since every change brings the potential for breaking or changing something. Most use cases likely fall somewhere between these extremes.

However, I will note that is you follow reasonable computing practices and separate OS and user data, installing a new version of the OS and restoring your user data is a very simple process. Plus, if you install the new OS on a different microSD card it is risk free since you install on a new card and copy your data across. You old card lurks as a backup until you are completely satisfied with the new OS.

The install new rather than upgrade recommendation is between distro releases and is a risk containment measure. If you have a generic install with nothing added, an upgrade will likely go just fine. If you have a heavily customized OS install, especially one with additional repositories added, the probability of an issue free update decreases. Having said that RPiOS is just Debian with some extra ARM goodies. You always can do an inplace upgrade, if you have the Linux chops to deal with the issues, up to and including the new install failing to boot. I took Ubuntu (another Debian based distro) through many, many years of inplace updates for the same reasons as folks climb mountains or jump out of perfectly good airplanes. Only failed to boot once, thought I broke a bunch of things along the way.

The other big advantage of install fresh is that it gets rid of all the cruft that tends to accumulate in an OS install over time as you add and delete things and mess with various config files.

mats-olov_rustad
Posts: 3
Joined: Mon Sep 28, 2020 12:44 pm

Re: Rrepository for ... stretch Release "does not have a Release file"

Fri Sep 15, 2023 3:44 pm

I made the suggested changes to the source.list configuration file on two different systems with the new common content as below:

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

I have uncommented the deb-src line since I use the Compute Module 3+ based module as a software development platform.

I have one question. On the second of the modules I got the following output from the sudo apt update command on the first execution after having changed the source.list file:

Get:2 http://legacy.raspbian.org/raspbian stretch InRelease [15.0 kB]
Hit:3 http://packages.revolutionpi.de stretch InRelease
Hit:4 http://repository.teamviewer.com/deb stable InRelease
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.3 kB]
Hit:5 http://packages.revolutionpi.de stretch-backports InRelease
Get:6 http://legacy.raspbian.org/raspbian stretch/main Sources [9,730 kB]
Get:7 http://legacy.raspbian.org/raspbian stretch/rpi Sources [1,132 B]
Get:8 http://legacy.raspbian.org/raspbian stretch/contrib Sources [75.2 kB]
Get:9 http://legacy.raspbian.org/raspbian stretch/non-free Sources [125 kB]
Get:10 http://legacy.raspbian.org/raspbian stretch/main armhf Packages [11.7 MB]
Get:11 http://legacy.raspbian.org/raspbian stretch/contrib armhf Packages [56.9 kB]
Get:12 http://legacy.raspbian.org/raspbian stretch/non-free armhf Packages [98.9 kB]
Get:13 http://legacy.raspbian.org/raspbian stretch/rpi armhf Packages [1,360 B]
Get:14 http://archive.raspberrypi.org/debian stretch/main armhf Packages [192 kB]
Fetched 25.3 kB in 19s (1,313 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

I thought that this was different from the first module so I ran the sudo apt update command again and got the following output:
Hit:1 http://repository.teamviewer.com/deb stable InRelease
Get:2 http://legacy.raspbian.org/raspbian stretch InRelease [15.0 kB]
Hit:3 http://archive.raspberrypi.org/debian stretch InRelease
Hit:4 http://packages.revolutionpi.de stretch InRelease
Hit:5 http://packages.revolutionpi.de stretch-backports InRelease
Fetched 15.0 kB in 5s (2,536 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

The first module only showed 5 repositories on all executions of sudo apt update.

Why did apt on the second module download packet lists from 14 different repositories on the first execution and only downloaded packet lists from 5 repositories on subsequent executions? Is this caused by the changed repository address? Why was there a difference in behaviour on the two modules with the exact same content of the source.list file?

With regards,
/m-o r

User avatar
DougieLawson
Posts: 42851
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Rrepository for ... stretch Release "does not have a Release file"

Fri Sep 15, 2023 4:05 pm

You do not need the "deb-src" line unless you want to download source code. Put a # at the start of the line and run sudo apt update
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

User avatar
rpdom
Posts: 23354
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Rrepository for ... stretch Release "does not have a Release file"

Fri Sep 15, 2023 4:56 pm

Your first run had found that some of the InRelease master index files had been updated, so it downloaded them, then checked them to see what had been changed. This led to it downloading some of the Sources and Packages index files.

The second time it saw that there had been no changes to the InRelease master indexes, so knew that it didn't need to download any Packages or Sources index files.

"Hit" means it found the file but the file date hasn't changed.
"Get" means the file has been changed, so it downloads it.
Unreadable squiggle

BigRedMailbox
Posts: 519
Joined: Sat Aug 20, 2022 10:37 pm

Re: Rrepository for ... stretch Release "does not have a Release file"

Fri Sep 15, 2023 8:42 pm

You do not need the "deb-src" line unless you want to download source code. Put a # at the start of the line...
There's no reason not to include the src line. It is quite helpful to have it there.

There is no indication that that line is causing whatever problems OP is having.
My posts may be "controversial" and/or out-of-sync with the party line.

Nothing I write should in any way be taken as an official statement by any organization connected with (any branch of) RPi and/or any of its funding sources.

mats-olov_rustad
Posts: 3
Joined: Mon Sep 28, 2020 12:44 pm

Re: Rrepository for ... stretch Release "does not have a Release file"

Sat Sep 16, 2023 10:00 am

As I explicitly stated in my follow-up question am I using the two modules in questions as development platform and I have previously downloaded the source code to them for use in gdb. The download was done before the retirement of the Strech repositories.

Thank you for the explanation about index files updates. I thought it was something similar to that but I thought I would get clarification from someone with more knowledge.

/m-o r

User avatar
Milliways
Posts: 904
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Rrepository for ... stretch Release "does not have a Release file"

Sun Sep 17, 2023 12:22 am

rpdom wrote:
Tue Sep 12, 2023 11:51 am
agupte wrote:
Tue Sep 12, 2023 11:35 am
Is stretch no longer supported?
There have been a few posts on this subject.

Stretch has not actually been supported for years. However the repository still exists, but has moved to http://legacy.raspbian.org/raspbian/dists/stretch/ It will stay there for a very long time, but will not receive any updates.

So change your sources.list entry from

Code: Select all

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
to

Code: Select all

deb http://legacy.raspbian.org/raspbian/ stretch main contrib non-free rpi
What about /etc/apt/sources.list.d/raspi.list which contained

Code: Select all

deb http://archive.raspberrypi.org/debian/ stretch main
Is this needed and if so what should it contain?

User avatar
rpdom
Posts: 23354
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Rrepository for ... stretch Release "does not have a Release file"

Sun Sep 17, 2023 12:34 am

Milliways wrote:
Sun Sep 17, 2023 12:22 am
What about /etc/apt/sources.list.d/raspi.list which contained

Code: Select all

deb http://archive.raspberrypi.org/debian/ stretch main
Is this needed and if so what should it contain?
That one hasn't changed. I assume it's been frozen. But there's no guarantee that it won't disappear at some point as it is no longer supported.
Unreadable squiggle

BigRedMailbox
Posts: 519
Joined: Sat Aug 20, 2022 10:37 pm

Re: Rrepository for ... stretch Release "does not have a Release file"

Sun Sep 17, 2023 11:55 am

But there's no guarantee that it won't disappear at some point as it is no longer supported.

There's no guarantee that anything will last beyond this moment.

Sooner or later, a flood or wildfire (or something else) will come along and wipe out everything.

Stretch (and bullseye and bookworm and so on) repositories included.
My posts may be "controversial" and/or out-of-sync with the party line.

Nothing I write should in any way be taken as an official statement by any organization connected with (any branch of) RPi and/or any of its funding sources.

Bianco
Posts: 56
Joined: Sun Jul 13, 2014 9:41 pm

Re: Rrepository for ... stretch Release "does not have a Release file"

Sat Dec 30, 2023 4:59 pm

bjtheone wrote:
Tue Sep 12, 2023 5:18 pm
If you are connected to the internet or running in an environment that requires security fixes to be applied, you should upgrade or may be contractually required to upgrade.
I've got a Raspberry Pi B+ that is running a couple of Python script that I don't want to take offline for time than necessary. Which version could I inplace upgrade to?

Would Buster be enough (security-wise, I don't care about new features)?

If the answer is Bullseye, should I upgrade to Buster before?

Return to “Troubleshooting”