Docker 图片 rabbitmq,apt 坏了

Docker image rabbitmq, apt broke

当我尝试 apt-get update 时,出现此错误:

E: The method driver /usr/lib/apt/methods/https could not be found.

解决方案:

sudo apt-get install apt-transport-https

但是当我尝试这样做时,出现了这个错误:

E: Unable to locate package apt-transport-https

解决方案:

apt-get update

所以我在循环中...

有什么想法吗? 通常所有这些都已安装,但我使用的是 rabbitmq docker image.

谢谢

您使用的图像似乎有一个损坏的 apt 安装,但您可以这样修复它:

ln -s http /usr/lib/apt/methods/https

这将允许 apt-get update 连接到远程存储库,但您将遇到第二个问题:此映像基于不再维护的 Debian Jessie,并且不再有任何 jessie-updates 个存储库,因此您会看到:

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease  Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://www.rabbitmq.com/debian/dists/testing/main/binary-amd64/Packages  Undetermined Error [IP: 104.20.62.197 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

但是,您应该仍然可以安装软件包。

那个docker图像有问题

我改变了:

FROM rabbitmq:3.6.6-management

FROM rabbitmq:management

现在可以用了,希望对其他人有帮助 谢谢 larsks