apt-get更新在先前运行的版本中失败,并显示404

我正在运行Travis构建,构建mysql:5.7.27 docker映像时失败。Dockerfile运行apt-get

update,然后出现错误W: Failed to fetch http://deb.debian.org/debian/dists/jessie-

updates/main/binary-amd64/Packages 404 Not Found

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

➜  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架构。

(如您在这里阅读)

一个解决方案(根据https://github.com/debuerreotype/docker-debian-

artifacts/issues/66#issuecomment-476616579)是添加以下行:

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

any apt-get update在使用debian:jessie 进行调用之前,将其放入Dockerfile 。这jessie-

updates将从sources.list中删除存储库(现在导致404)。

因此,尽管以下操作无效:

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 的全部内容, 来源链接: utcz.com/qa/423337.html

回到顶部