从debian wheezy backports安装git:无论如何,我看到旧的包版本

我需要安装git 1.8。*版本。

  1. 我添加了backports到我的sources.list;
  2. 通过apt-get remove git删除当前安装的apt-get remove git ;
  3. 执行apt-get update来更新我的软件包列表
  4. aptitude show git仍然显示Version: 1:1.7.10.4-1+wheezy1

我做错了什么?

这是我的/etc/apt/sources.list:

 deb http://ftp.de.debian.org/debian/ wheezy main deb-src http://ftp.de.debian.org/debian/ wheezy main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main # wheezy-updates, previously known as 'volatile' deb http://ftp.de.debian.org/debian/ wheezy-updates main deb-src http://ftp.de.debian.org/debian/ wheezy-updates main # deb multimedia deb http://www.deb-multimedia.org wheezy main non-free # wheezy backpors deb http://ftp.de.debian.org/debian wheezy-backports main 

PS我也尝试执行apt-get install git --reinstall ,但它没有效果 – 版本仍然是1.7

PPS是的,我相信它应该是1.8。 在后台: http : //packages.debian.org/wheezy-backports/git

Backport存储库的优先级低于main / updates / security存储库。 有几种方法可以安装它:

 sudo apt-get install git/wheezy-backports sudo apt-get -t wheezy-backports install git 

修改apt.conf并添加以下行:

 APT::Default-Release "wheezy-backports"; 

或者在首选项文件中:

 Package: git Pin: origin release a=wheezy-backports Pin-Priority: 990