Build Error. Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages

感情迁移 提交于 2019-12-21 14:58:53

问题


Build Errors unable to find jq.

Err http://deb.debian.org jessie/main amd64 Packages 404 Not Found Err http://deb.debian.org jessie-updates/main amd64 Packages 404 Not Found Fetched 723 kB in 2s (357 kB/s) W: Failed to fetch http://deb.debian.org/debian/dists/jessie/main/binary-amd64/Packages 404 Not Found

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

E: Some index files failed to download. They have been ignored, or old ones used instead.
$ apt-get install jq
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package jq
ERROR: Job failed: exit code 1


回答1:


@codinghaus mentioned in another thread:

This is due to the fact that as Wheezy and Jessie have been integrated into the archive.debian.org structure recently, we are now removing all of Wheezy and all non-LTS architectures of Jessie from the mirror network starting today.

A solution (according to https://github.com/debuerreotype/docker-debian-artifacts/issues/66#issuecomment-476616579) is to add the following command into your Dockerfile before calling any apt-get update when using debian:jessie.

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

This will remove the jessie-updates repository (which now causes the 404) from sources.list.

FROM debian:jessie
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list  # Now archived
RUN apt-get update
CMD /bin/sh



回答2:


Maybe, the third party import that you are doing is not able to refer to the debian jessie, so changing ftp.debian.org to http://ftp.us.debian.org might make it work. If you are not referring to this directly, try upgrading or downgrading the imported versions, if removing them is not the option.

In my case, i was using:

FROM docker.***.com/node:10

downgrading the node from 10 to 8, kicked off the job successfully.




回答3:


I had the same problem today. I believe yours is related to Jessie being removed from Debian (see: https://twitter.com/debian/status/1109080168318926851?s=12).

I upgraded php in Dockerfile to php:7.1.27-apache-stretch and it worked.




回答4:


Just place this line before your apt-get commands in your Dockerfile:

RUN echo "deb http://deb.debian.org/debian jessie main" > /etc/apt/sources.list

Debian removed some url for old packages which is causing this issue. The line fixes the repository to refer to.



来源:https://stackoverflow.com/questions/52939411/build-error-failed-to-fetch-http-deb-debian-org-debian-dists-jessie-updates-m

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!