Dev*_*der 11 debian git apt dependencies package-management
我正在尝试安装 gitDebian 8.6 Jessie并且遇到了一些依赖性问题。奇怪的是,Git当我习惯 Linux 时,我最近在 VM 中安装了几次没有任何问题。
apt-get install git
结果:
The following packages have unmet dependencies:
git : Depends: liberror-perl but is not installable
Recommends: rsync but it is not installable
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
更新
我的 sources.list
好像是我系统的问题。我无法再正确安装任何东西。我在安装类似Pulseaudio几天前成功安装的东西时遇到了依赖性问题。
GAD*_*D3R 17
您应该通过添加以下行来编辑您的 sources.list :
deb http://ftp.ca.debian.org/debian/ jessie main contrib
Run Code Online (Sandbox Code Playgroud)
然后升级您的软件包并安装git:
apt-get update && apt-get upgrade && apt-get dist-upgrade
apt-get -f install
apt-get install git
Run Code Online (Sandbox Code Playgroud)
编辑
下面的包git,liberror-perl和[rsync] 3可以从mainrepo下载,因为你没有mainreposources.list你不能安装git和它的依赖项。
你sources.list应该是(带non-free包):
deb http://ftp.ca.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.ca.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.ca.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.ca.debian.org/debian/ jessie-updates main contrib non-free
deb http://ftp.ca.debian.org/debian/ jessie-backports main contrib non-free
Run Code Online (Sandbox Code Playgroud)
在 debian Stretch 你/etc/apt/sources.list应该(至少):
deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/ stretch/updates main
deb http://deb.debian.org/debian/ stretch-updates main
Run Code Online (Sandbox Code Playgroud)