尝试安装 Git 时未满足的依赖关系

尝试安装 Git 时未满足的依赖关系

我知道这类问题经常被问到,并且我阅读了很多主题(特别是这个)围绕此类问题而没有找到“简单”的解决方案(我的意思是不编辑DEBIAN/control包的文件)。

问题是这样的:

Lila ~ # apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1757 not upgraded.

Lila ~ # cat /etc/apt/sources.list | grep -v '#'
deb [arch=amd64,i386]  http://ftp.fr.debian.org/debian/ stretch main non-free contrib
deb http://security.debian.org/debian-security stretch/updates main
deb http://ftp.debian.org/debian stretch-backports main
deb ftp://ftp.deb-multimedia.org stretch main non-free

Lila ~ # apt-cache policy git
git:
Installed: 1:2.11.0-3+deb9u1
Candidate: 1:2.11.0-3+deb9u1
Version table:
    1:2.14.1-3~bpo9+1 100
        100 http://ftp.debian.org/debian stretch-backports/main amd64 Packages
*** 1:2.11.0-3+deb9u1 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
        100 /var/lib/dpkg/status
    1:2.11.0-3 500
        500 http://ftp.fr.debian.org/debian stretch/main amd64 Packages

Lila ~ # apt-get install git=1:2.14.1-3~bpo9+1
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:
git : Depends: git-man (> 1:2.14.1) but 1:2.11.0-3+deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.

以人类可读的格式:我必须安装 git >= 2.13 才能工作。我目前处于 Debian 稳定版(我感觉这将会改变);我正在尝试从向后移植安装测试版本。

答案1

自动回答:我终于发现我必须告诉 apt-get 从stretch-backports 安装这个版本:

apt-get install -t stretch-backports git

=> 工作过

相关内容