15

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.

d3corator
  • 1,154
  • 1
  • 9
  • 23
  • 1
    duplicate of https://unix.stackexchange.com/questions/508724/failed-to-fetch-jessie-backports-repository – umläute Mar 27 '19 at 21:38
  • Possible duplicate of [apt-get update fails with 404 in a previously working build](https://stackoverflow.com/questions/55361762/apt-get-update-fails-with-404-in-a-previously-working-build) – David Maze Mar 28 '19 at 03:17
  • I got my answer from https://unix.stackexchange.com/a/508948/200484 It's one of the answers from the question that @umläute mentioned, but I'm not getting option to click That solved my problem. Whereas I do get that option for the question that David mentioned. – d3corator Mar 28 '19 at 17:43
  • 1
    that's because you are a user at [so] but not (yet) at [Unix & Linux](https://unix.stackexchange.com) – umläute Mar 29 '19 at 11:54
  • 1
    I'm a user at but I assume cross-site question duplication is maybe not available. I've added an answer to make this thread useful for others. – d3corator Mar 29 '19 at 13:11

3 Answers3

30

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

d3corator
  • 1,154
  • 1
  • 9
  • 23
1

Just try to add this in your DockerFIle:

RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.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
Awesome123
  • 11
  • 3
1

What helped me on that case was to change the jessie version in my Dockerfile to:

FROM php:7.1.27-fpm-jessie

In my case it was php but should work with other docker images as well.