如何在 Debian Wheezy 上安装 git 1.8 或更高版本 [英] How to install git 1.8 or above on Debian Wheezy
问题描述
我正在尝试安装更高版本的 git(主要是 1.8.* 或更高版本).如果我尝试使用 apt-get install git
安装它,我最终会安装版本 1.7.10.4
.
I'm trying trying to install a later version of git (primarily 1.8.* or above). if I try and install it using apt-get install git
I end up installing version 1.7.10.4
.
我已经尝试使用以下方法更改存储库:
I have already tried changing the repository using the method below:
add-apt-repository ppa:git-core/ppa
apt-get update
apt-get install git
apt-get update
的输出只是给了我以下信息,因此,我最终再次安装了版本 1.7.10.4
.
The output of apt-get update
just gives the me the following and because of that, I end up installing version 1.7.10.4
again.
W: Failed to fetch http://ppa.launchpad.net/git-core/ppa/ubuntu/dists/wheezy/main/source/Sources 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/git-core/ppa/ubuntu/dists/wheezy/main/binary-amd64/Packages 404 Not Found
我也尝试过使用 backport 安装 git,如下所示:
I have also tried to install git using a backport, like the following:
sudo apt-get install git/wheezy-backports
sudo apt-get -t wheezy-backports install git
我永远不会比 apt-get install git/wheezy-backports
更进一步,因为我最终会收到以下错误:
I never end up getting further than apt-get install git/wheezy-backports
because then I end up getting the following error:
E: Release 'wheezy-backports' for 'git' was not found
如何在 Debian Wheezy 上安装 git 1.8.* 或更高版本?
推荐答案
我绝对推荐使用 backports 版本.要使用 backports 存储库,请记住,您必须将以下行添加到/etc/apt/sources.list:
I would definitely recommend using the backports version. To use the backports repository, keep in mind that you must add the following line to your /etc/apt/sources.list:
deb http://http.debian.net/debian wheezy-backports main
然后您可以使用 apt-get 重试.您可以在 http://backports.debian.org/Instructions/#index2h2 找到完整的说明
And then you can retry with apt-get. You will find full instructions at http://backports.debian.org/Instructions/#index2h2
这篇关于如何在 Debian Wheezy 上安装 git 1.8 或更高版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!