Debian Snapshot Archive描述了能够将快照存储库添加到/etc/apt/sources.list
中,以便可以直接从存档使用apt-get
安装debian二进制文件。
这听起来很直截了当。但是,当我按照sources.list
所述配置一个vanilla Debian机器指向repos的快照版本时,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
等显示所请求的软件包和版本存在,因此不清楚为什么它不能简单地安装它们。
使用Dockerfile like this很容易说明这个问题,以便尝试从运行docker的任何计算机上的vanilla Debian版本上安装debian软件包。
我注意到,如果我从快照存档中抓取特定的.deb
文件(例如this dockerfile),从快照存档安装就可以正常工作,但很明显这不是Debian Snapshot Archive中列出的预期方法。 {3}}表示只需将回购添加到souces.list
。
答案 0 :(得分:1)
我不明白为什么会失败,但我找到了解决方法:
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
我会发送拉取请求