安装 git 时使用:
sudo apt-get install git
我收到以下错误:
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: liberror-perl but it is not installable
E: Unable to correct problems, you have held broken packages.
答案1
老问题,新答案。
问题并不总是与unsupported releases
nornon installable
项目有关。事实上,您的系统上可用的源列表不完整。更新/etc/apt/sources.list
,在我的情况下使用stretch
:
deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://deb.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src
如果不需要,您可以注释掉这些行,然后按照标准apt update
操作即可!