
我需要安裝 git 1.8.* 版本。
- 我將向後移植添加到了我的sources.list;
apt-get remove git
透過;刪除目前安裝的 git- 執行
apt-get update
以更新我的套件列表 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
答案1
向後移植儲存庫的優先權低於主/更新/安全儲存庫。您可以透過多種方式安裝它:
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