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

d3corator picture d3corator · Mar 27, 2019 · Viewed 22k times · Source

I'm trying to get a project running locally on Deepin. The project relies on node 6.10, I understand that it's an old version but it works. When the Dockerfile tries to run the sudo apt-get update, it gives the following error:

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

The weird thing is that I just deployed it yesterday on a Macbook without such an issue. Any ideas?


The mentioned duplicate question doesn't help me due to the fact that I'm not relying on a Docker image of Debian Jessie but instead using Node 6.10 which itself relies on Debian Jessie therefore I can't manage the sources directly.

Answer

d3corator picture d3corator · Mar 29, 2019

Thanks to @Awesome123 for the useful answer and other people who commented. Their suggestions were useful but didn't give an exact steps to get rid of problem because the trouble that I was having was due to an image of Node 6.10, which comes with Debian Jessie. To resolve the issue I updated my Dockerfile with following:

RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list

# As suggested by a user, for some people this line works instead of the first one. Use whichever works for your case
# RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list


RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list

RUN apt-get -o Acquire::Check-Valid-Until=false update

Here is a reference to the existing answer on StackExchange where I discovered the snippet: https://unix.stackexchange.com/a/508948/200484


UPDATE 1

As suggested by @douglas-resende, I've updated the snippet to include a replacement of line 1 (commented), it works for some people