77

Whenever trying to install some programs from source, or specifically running apt update, I receive this message:

E: The repository 'http://ftp.ca.debian.org/debian stretch/updates 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 started getting this after adding the architecture i386. Without it, I would not be able to install the proprietary Nvidia driver, and Steam client would not start at all. This is what my /etc/apt/sources.list reads:

deb http://ftp.ca.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.ca.debian.org/debian/ stretch main contrib non-free

deb http://ftp.ca.debian.org/debian/ stretch/updates main contrib non-free
deb-src http://ftp.ca.debian.org/debian/ stretch/updates main contrib non-free

####stretch-updates, previously known as 'volatile'

deb http://ftp.ca.debian.org/debian/ stretch-updates main contrib non-free

deb-src http://ftp.ca.debian.org/debian/ stretch-updates main contrib non-free
GAD3R
  • 63,407
  • 31
  • 131
  • 192

2 Answers2

46

You’ve got both stretch-updates and stretch/updates, but the latter doesn’t exist any more (at least on the mirror you’re using). You should remove the references to stretch/updates, or — if you’re expecting the stretch/updates lines to provide security updates — replace them with

deb http://security.debian.org/ stretch/updates main contrib non-free

In late April 2023, the Stretch repositories were removed from the main mirrors, so you’ll need to switch to archive.debian.org; see apt-get update failed to fetch debian amd64 packages while building dockerfile from maven:3.5.2-jdk-8 and Security repo for Debian stretch not working anymore for details.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
  • i removed it, and it solved the issue, but its odd because in the Software & Sources program, stretch/release (with the slash) refers to the security updates of stretch. –  Jun 19 '17 at 05:37
  • 2
    Right, but that’s from `https://security.debian.org`, not your local mirror. (And it’s `stretch/updates` , not `stretch/release`; see [here](http://security.debian.org/dists/stretch/updates/) for the `Release` file and [the corresponding instructions](https://www.debian.org/security/).) – Stephen Kitt Jun 19 '17 at 06:10
20

Run the following command and it should be fixed

echo "deb http://archive.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list

or change the repository website deb.debian.org to archive.debian.org by running:

sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list

and if there is security too (security.debian.org) then:

sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list

the reasons

AliRNazari
  • 301
  • 2
  • 6
  • Interesting. Also, at the [official Debian packages website](https://www.debian.org/distrib/packages), there is not information about `stretch` anymore, one week ago (April, 2023) I got the stretch versions for each package that I filter. – Franco Gil Apr 24 '23 at 15:23
  • 1
    This issue bites me today as well... – jdehaan Apr 24 '23 at 15:51
  • 1
    @AliRNazari based on the [archive Debian mirror](http://archive.debian.org/debian/dists/), there is not exist the `stretch-security` directory (yet), assuming that there is not usefull, I edit your answer instead of pulbish a new one. – Franco Gil Apr 24 '23 at 15:59
  • @FrancoGil You are right. Thanks for the edit. o/ – AliRNazari Apr 25 '23 at 08:44
  • @FrancoGil is the man! for those on older gen of CircleCi image like me ```sudo echo deb http://archive.debian.org/debian stretch main contrib non-free" | sudo -E tee /etc/apt/sources.list``` – Arnaud Bouchot Apr 25 '23 at 11:19
  • 2
    Thanks for this solution! Would you mind explaining what you're actually doing here resp. why this entry is required in `/etc/apt/sources.list` by now? – NotX Apr 26 '23 at 13:14
  • 3
    @NotX In March of 2023, the Debian 9 `stretch` was copied to the archive site, and about a month later (in April), it was removed from the main Debian repository sites. [Announcement on Debian-devel-announce mailing list.](https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html) That caused the original repository entries in `sources.list` to stop working. If you still want to download packages for Debian 9, you'll have to switch to using the archive site instead. – telcoM Jun 06 '23 at 19:30