5

We use node:8-jessie on our containerized environment then yesterday we suddenly encountered Packages not found 404 error.

W: Failed to fetch http://security.debian.org/debian-security/dists/jessie/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.130.132 80]

W: Failed to fetch http://deb.debian.org/debian/dists/jessie/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

Then we made some adjustments on our Dockerfile based on the fix indicated here and here. But we encountered the same failed to fetch error provided above with additional GPG error:

W: GPG error: http://archive.debian.org jessie-backports InRelease: The following signatures were invalid: KEYEXPIRED 1587841717 KEYEXPIRED 1668891673

Here's my Dockerfile:

FROM node:8-jessie

RUN echo 'deb http://archive.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-backports.list
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update
Kim Briones
  • 51
  • 1
  • 3

3 Answers3

5

security.debian.org no longer contains jessie updates, you should look for them in archive.debian.org/debian-security.

Change the line pointing to that repo for this line:

deb http://archive.debian.org/debian-security jessie/updates main 

See https://lists.debian.org/debian-devel-announce/2023/02/msg00004.html

Similarly, deb.debian.org should be changed for archive.debian.org

Marcos Modenesi
  • 277
  • 1
  • 11
  • 2
    The link works. Now my Dockerfile became like this: RUN rm /etc/apt/sources.list RUN echo "deb http://archive.debian.org/debian-security jessie/updates main" > /etc/apt/sources.list.d/jessie.list RUN apt-get update Thanks @Marcos! – Kim Briones Apr 02 '23 at 21:31
  • 3
    Make sure to add `http://` in front of the archive url above btw – Johan Haest Apr 06 '23 at 15:10
2
FROM node:8-jessie

RUN rm /etc/apt/sources.list

RUN echo "deb http://archive.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list.d/jessie.list

RUN echo "deb http://archive.debian.org/debian jessie main" >> /etc/apt/sources.list.d/jessie.list
B. Lakshmi
  • 159
  • 8
  • While this code may solve the question, [including an explanation](//meta.stackexchange.com/q/114762) of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please [edit] your answer to add explanations and give an indication of what limitations and assumptions apply. – Yunnosch Aug 05 '23 at 08:17
1
deb http://archive.debian.org/debian/ jessie main
deb-src http://archive.debian.org/debian/ jessie main

deb http://archive.debian.org/debian-security jessie/updates main
deb-src http://archive.debian.org/debian/ jessie main

in /etc/apt/sources.list

fixed it for me, while the other solution did not work anymore.

NanoPish
  • 1,379
  • 1
  • 19
  • 35