apt-get更新在先前运行的版本中失败,并显示404 [英] apt-get update fails with 404 in a previously working build

查看:456
本文介绍了apt-get更新在先前运行的版本中失败,并显示404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Travis构建,并且在构建mysql:5.7.27 docker映像时失败。 Dockerfile运行 apt-get update ,然后出现错误 W:无法获取http://deb.debian.org/debian/dists / jessie-updates / main / binary-amd64 / Packages 404未找到

I am running a Travis build and it fails when building the mysql:5.7.27 docker image. The Dockerfile runs apt-get update and then I get an error W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found.

使用curl我可以看到它正在重定向,但是重定向-to URL结果为404。有人看到这种行为并且有补救措施吗?在debian进行更改之前,它基本上不可修复吗?

Using curl I can see it is redirecting, but the redirect-to URL results in a 404. Has anyone seen this sort of behaviour and have a remedy? Is it basically unfixable until debian makes changes?

➜  ms git:(develop) curl --head http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages
HTTP/1.1 302 Found
Date: Tue, 26 Mar 2019 16:03:04 GMT
Server: Apache
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
Referrer-Policy: no-referrer
X-Xss-Protection: 1
Location: http://cdn-fastly.deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages
Content-Type: text/html; charset=iso-8859-1

➜  ms git:(develop) curl --head http://cdn-fastly.deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages
HTTP/1.1 404 Not Found
Server: Apache
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
Referrer-Policy: no-referrer
X-Xss-Protection: 1
Content-Type: text/html; charset=iso-8859-1
Via: 1.1 varnish
Content-Length: 316
Accept-Ranges: bytes
Date: Tue, 26 Mar 2019 16:03:17 GMT
Via: 1.1 varnish
Age: 45
Connection: keep-alive
X-Served-By: cache-ams21028-AMS, cache-cdg20741-CDG
X-Cache: HIT, HIT
X-Cache-Hits: 6, 2
X-Timer: S1553616198.734091,VS0,VE0


推荐答案

这是由于


由于Wheezy和Jessie最近已集成到archive.debian.org
结构中,因此我们将从今天开始从镜像网络中删除Jessie的所有Wheezy和所有非LTS
架构。

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.

(您可以阅读此处

一种解决方案(根据 https://github.com/debuerreotype/docker-debian-artifacts/issues/66#issuecomment-476616579 )将添加以下行:

A solution (according to https://github.com/debuerreotype/docker-debian-artifacts/issues/66#issuecomment-476616579) is to add this line:

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

在使用debian:jessie调用任何apt-get更新之前,先进入Dockerfile。这将从sources.list中删除 jessie-updates 存储库(现在会导致404)。

into your Dockerfile before calling any apt-get update when using debian:jessie. This will remove the jessie-updates repository (which now causes the 404) from sources.list.

以下操作不起作用:

FROM debian:jessie
RUN apt-get update
CMD /bin/sh

工作方式如下:

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

这篇关于apt-get更新在先前运行的版本中失败,并显示404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆