git - 如何在 Debian Wheezy 上安装 git 1.8 或更高版本

标签 git debian

我正在尝试安装更高版本的 git(主要是 1.8.* 或更高版本)。如果我尝试使用 apt-get install git 安装它,我最终会安装版本 1.7.10.4

我已经尝试使用以下方法更改存储库:

add-apt-repository ppa:git-core/ppa
apt-get update
apt-get install git

apt-get update 的输出只为我提供了以下内容,因此,我最终再次安装了版本 1.7.10.4

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

我还尝试使用向后移植安装 git,如下所示:

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

我永远不会比 apt-get install git/wheezy-backports 走得更远,因为那样我就会收到以下错误:

E: Release 'wheezy-backports' for 'git' was not found

我如何在 Debian Wheezy 上安装 git 1.8.* 或更高版本?

最佳答案

我肯定会推荐使用向后移植版本。要使用 backports 存储库,请记住您必须将以下行添加到/etc/apt/sources.list 中:

deb http://http.debian.net/debian wheezy-backports main

然后您可以使用 apt-get 重试。您可以在 http://backports.debian.org/Instructions/#index2h2 找到完整的说明。

关于git - 如何在 Debian Wheezy 上安装 git 1.8 或更高版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25088554/

相关文章:

用于 cd 到 git root 的 shell 命令的 git 别名未按预期工作

git - 如何在本地还原 pull 请求?

sql - 比较两个表中的数据

node.js - 在树莓派 2 上安装 node.js

linux - Debian 不加载 X

git - 将两个 bitbucket 存储库克隆到同一文件夹中

git - 我可以恢复已删除的文件(撤消 `git clean -fdx` )吗?

python - python 和 debian 9 的 Unicode 版本

php - 为什么那些 crontab 规则不起作用?

git - 将 git 日志日期格式保存在 .gitconfig 中