gpt4 book ai didi

linux - 从 Debian Snapshot Archives 存储库安装软件包?

转载 作者:太空狗 更新时间:2023-10-29 11:13:53 26 4
gpt4 key购买 nike

Debian Snapshot Archive描述了能够将快照存储库添加到 /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 等显示请求的包和版本存在,所以不清楚为什么它不简单地安装它们。

使用 Dockerfile 很容易说明这个问题,like this ,以便尝试从任何运行 docker 的计算机上在普通 Debian 版本上安装 debian 软件包。

我注意到,如果我从快照存档中获取特定的 .deb 文件(例如 this 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

我将发送拉取请求

关于linux - 从 Debian Snapshot Archives 存储库安装软件包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26369769/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com