[英]Install packages from the Debian Snapshot Archives repo?
Debian Snapshot Archive描述了能夠將快照存儲庫添加到/etc/apt/sources.list
以便可以直接從存檔中使用apt-get
安裝debian二進制文件。
這聽起來很直截了當。 但是,當我配置一個vanilla機器時,如所描述的sources.list
指向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很容易說明這個問題,以便嘗試從運行docker的任何計算機上的vanilla Debian版本上安裝debian軟件包。
我注意到,如果我從快照存檔(例如此dockerfile )中獲取特定的.deb
文件,從快照存檔安裝就可以正常工作,但很明顯這不是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
我會發送一個拉取請求
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.