在 ubuntu 中安装最新版本的 git [英] Installing Latest version of git in ubuntu

查看:35
本文介绍了在 ubuntu 中安装最新版本的 git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前的 git 版本 1.7.9.5...

My Current git version 1.7.9.5...

我需要至少升级到 git 1.7.10 才能让 git clone 命令正常工作

I need to upgrade to at least git 1.7.10 to have git clone command to work properly

我尝试了 sudo add-apt-repository ppa:git-core/ppa 进行升级,但结果是:

I tried sudo add-apt-repository ppa:git-core/ppa for upgrading but resulted in this :

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 125, in <module>
    ppa_info = get_ppa_info_from_lp(user, ppa_name)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 80, in get_ppa_info_from_lp
    curl.perform()
pycurl.error: (7, "couldn't connect to host")

我应该怎么做才能安装最新的 git(升级)?

What am I supposed to do to get the latest git installed (to upgrade)?

推荐答案

Ubuntu git 维护者团队有一个 PPA 就是为了这个

ppa:git-core/ppa

就去做:

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

如果没有找到add-apt-repository命令,先用

If add-apt-repository command is not found, install it first with

sudo apt-get install software-properties-common python-software-properties

这篇关于在 ubuntu 中安装最新版本的 git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆