Debian

從 debian wheezy backports 安裝 git:無論如何我看到舊包版本

  • January 16, 2014

我需要安裝 git 1.8.* 版本。

  1. 我在我的 sources.list 中添加了反向移植;
  2. apt-get remove git通過;刪除目前安裝的 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

引用自:https://serverfault.com/questions/567237