W:无法获取http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Package 404找不到[IP:151.101.140.204 80]

d3c*_*tor 11 debian apt node.js docker docker-compose

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]
Run Code Online (Sandbox Code Playgroud)

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.

d3c*_*tor 20

感谢@ Awesome123提供了有用的答案以及其他发表评论的人。他们的建议很有用,但没有给出解决问题的确切步骤,因为我遇到的麻烦归因于Debian Jessie附带的Node 6.10映像。为了解决该问题,我使用以下命令更新了Dockerfile:

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
Run Code Online (Sandbox Code Playgroud)

这是对我发现摘要的StackExchange上现有答案的引用:https : //unix.stackexchange.com/a/508948/200484


更新1

正如@ douglas-resende所建议的那样,我更新了代码段以包括替换第1行(注释),它对某些人有效

  • 当我在第一行将“ jessie-backports”替换为“ jessie”时,它起作用。谢谢 (3认同)
  • 谢谢@DouglasResende,在将“ jessie-backports”替换为“ jessie”之后,它可以工作了。 (3认同)