我需要使 debian:9 容器映像正常工作。
首先 dockerfile 失败了
apt-get update -y
所以我做了:
RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list.d/backdoors.list
RUN rm /etc/apt/sources.list
所以现在 apt-get 更新工作正常。但是,我需要安装curl并且我不断收到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
curl : Depends: libcurl3 (= 7.52.1-5+deb9u10) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我不知道如何查看包是否已移动到另一个存储库,并且恢复以前的sources.list 不起作用。我也尝试安装 libcurl3 但它也不起作用。
解决这个问题的正确方法是什么?
答案1
解决了。
由于所有内容都已移植到存档,因此我使用了错误的链接。我应该从
deb http://security.debian.org/debian-security stretch/updates main
到
deb http://archive.debian.org/debian-security stretch/updates main
然后,运行
apt-get update
apt-get install curl