您应该通过添加以下行来编辑sources.list:
deb http://ftp.ca.debian.org/debian/ jessie main contrib
然后升级您的软件包并安装git
:
apt-get update && apt-get upgrade && apt-get dist-upgrade
apt-get -f install
apt-get install git
编辑
下面的包git
,liberror-perl
并且[rsync
] 3可以从下载main
回购,因为你没有main
在你的回购sources.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
在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
sudo apt -f install
或sudo aptitude -f
。