Debian Snapshot Archive(Debian快照存档)描述了能够将快照存储库添加到其中,/etc/apt/sources.list
以便人们可以apt-get
直接使用来自存档的Debian二进制文件。
这听起来很直接。但是,当我按照sources.list
指向存储库快照版本的说明配置香草Debian机器时,apt-get install
拒绝安装依赖项。例如,调用:
apt-get -o Acquire::Check-Valid-Until=false update \
&& apt-get install -y --no-install-recommends r-base
结果错误:
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:
r-base : Depends: r-base-core (>= 2.11.1-6) but it is not going to be installed
Depends: r-recommended (= 2.11.1-6) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Broken packages
apt-cache show r-base-core
etc显示所请求的软件包和版本存在,因此尚不清楚为什么不简单地安装它们。
这是很容易说明使用Dockerfile,这个问题是这样,以试图在香草debian发行安装Debian软件包从任何计算机上运行的码头工人。
我注意到,如果我.deb
从快照存档中抓取特定文件(例如,此dockerfile),则从快照存档进行安装就可以了,但是显然,这不是Debian Snapshot Archive中概述的预期方法,该方法只是将存储库添加到souces.list
。
我不知道为什么它会失败,但是我找到了一种解决方法:
FROM debian:wheezy
### SNAPSHOTTING: create a new source + preferences for r-* deb pkgs
RUN echo \
'deb http://snapshot.debian.org/archive/debian/20101017/ sid main' > /etc/apt/sources.list.d/snapshot.list \
&& printf "Package: r-*\nPin: origin snapshot.debian.org\nPin-Priority: 990\n" > /etc/apt/preferences.d/snapshot \
&& apt-get -o Acquire::Check-Valid-Until=false update
# install recommended
RUN apt-get install -y --no-install-recommends --allow-unauthenticated r-base-dev
我将发送请求请求
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句