55

Today I started to get these errors messages when i run apt-get update

404  Not Found

E: The repository 'http://security.debian.org stretch/updates Release' does no longer have a Release file.

Do you know what could be the cause of it?

I have updated the source:

deb http://security.debian.org/ stretch/updates main

with

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

but I keep getting the same errors

Luis Herrera
  • 1,092
  • 1
  • 7
  • 11
  • Found that the stretch suite was imported to `archive.debian.org` https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html – Luis Herrera Apr 24 '23 at 17:14

9 Answers9

121

For docker users, here is what you have to do:

# Update stretch repositories
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
           -e 's|security.debian.org|archive.debian.org/|g' \
           -e '/stretch-updates/d' /etc/apt/sources.list
giosh94mhz
  • 2,908
  • 14
  • 25
Alain Hernandez
  • 1,326
  • 1
  • 8
  • 3
  • It seems to work, but it's extremely slow. The `apt-get update` and `apt-get upgrade` commands took about 1.5 hours on the archive URL. Is it as slow for you as well? – Jordy Apr 26 '23 at 11:32
  • Can you share the whole sources.list patched please? – Romain-p May 03 '23 at 22:50
  • Works like a charm! Thanks – Lucas Jun 13 '23 at 06:39
  • A slight update as a mix between the first reply and the second + some extra magic (how the heck do i fix formatting ) `sed -i -e 's/deb.debian.org/archive.debian.org/g' \` -e 's|security.debian.org|archive.debian.org/debian-security|g' \ -e '/stretch-updates/d' /etc/apt/sources.list && \ sed -i -e 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list.d/backports.list ` – CoolGoose Jul 05 '23 at 12:44
39

OK, after further research, I found that Debian imported the stretch suite to archive.debian.org, according to https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html

So I fixed it by replacing the sources:

deb.debian.org to archive.debian.org

security.debian.org to archive.debian.org/debian-security/

And removing the source stretch-updates since it's not available in the archive's sources: Debian Stretch archive

Commands:

I used these bash commands to make the replacement:

replace deb.debian.org with archive.debian.org:

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

replace security.debian.org with archive.debian.org/debian-security/:

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

remove line that contains source stretch-updates:

sudo sed -i '/stretch-updates/d' /etc/apt/sources.list

SuperStormer
  • 4,997
  • 5
  • 25
  • 35
Luis Herrera
  • 1,092
  • 1
  • 7
  • 11
  • This worked for me. I am using php:7.2.4-fpm; however, upgrading the base image to php:8.0.11-fpm also fixed the issue. – Fausto Gomez May 09 '23 at 20:08
3

In my case the problem has been solved with newer NodeJS base image in docker file as follow.

We had:

FROM node:14.18.3-slim

in dockerfile but I changed it to:

FROM node:14-slim

I recommend to bump it to the latest version, node:18-slim for NodeJs and find the latest version for your tech stack you use.

Javad Norouzi
  • 327
  • 4
  • 11
1

Agree with Alain Hernadez's answer. Just watch out for the security source. Not archive.debian.org but archive.debian.org/debian-security instead.

RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
           -e 's|security.debian.org|archive.debian.org/debian-security/|g' \
           -e '/stretch-updates/d' /etc/apt/sources.list
0

You can add this for updates:

deb http://archive.debian.org/debian stretch-proposed-updates main
0

I bumped into the same issue leading to buildx failure, as in my case it was trying to build docker image.

Solved it by replacing the below line in my Dockerfile:

RUN add-apt-repository "deb http://http.us.debian.org/debian stretch main contrib non-free"

with the following line:

RUN add-apt-repository "deb http://archive.debian.org/debian/ stretch main contrib non-free"
Piyush
  • 11
  • 1
0

I have to replace below line in my docker file:

RUN sed -i '/jessie-updates/d' /etc/apt/sources.list

with :

RUN sed -i '/stretch-updates/d' /etc/apt/sources.list

to get it running again.

Hemant Kumar
  • 161
  • 7
0

This works for me:

RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
RUN sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list 
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list 
Rub21
  • 647
  • 7
  • 5
-1

Did you made any changes to your network? Maybe something with firewall is going wrong.

I have an proxmox VM server with LAMP on it. I redirected incoming traffic from port 80 to this LAMP instance and then i cannot no more get apt-update. I was reading 5 of the google pages, trying to find some help but after typing in my shell apt-get update and watching the log on the router - i saw that there is problem with routing - packets will go to the LAMP server, not the proxmox VM

Solution to this was to disable the dst-nat port redirecting.

I think this may be confusing to a lot of people, because you can ping the server, everything responds okay, there is no issue with DNS lookup or something like this - its just packets that are going to nowhere :)