Upgrade git version under Ubuntu (source code compiled to install git)

Source: Internet
Author: User
Tags install openssl openssl install perl

Ubuntu comes with Git is 1.7 version, too old, so want to upgrade, GIT official online does not provide ready-made installation package, so only energy code compiled.

Linux on the source code compiled to install Git fly in two steps:

The first step is to install a git-compiled dependency package
Step Two, download the source code, compile and install git

Install the GIT installation package:

On the Apt-get system:

sudo apt-get install Curl curl-devel zlib-devel openssl-devel perl cpio expat-devel Gettex-devel

On the Yum system:

Yum Install Curl
Yum Install Curl-devel
Yum Install Zlib-devel
Yum Install Openssl-devel
Yum Install Perl
Yum Install Cpio
Yum Install Expat-devel
Yum Install Gettext-devel

Download the source code, compile and install git:

Because Ubuntu comes with git, you can download git source from git clone:

git clone https://github.com/git/git.git

without git, you can go to GitHub to download: Https://github.com/git/git

on GitHub:Https://github.com/git/git/archive/master.zip

can also be in Command input: wget https://github.com/git/git/archive/master.zip

PS: Not really, can be downloaded to me http://download.csdn.net/detail/caiwenfeng_for_23/8600135 This is the git2.4.0 version of the

Unzip Git2.4.0.rc2_master.zip

CD GIT-XXXX-XX-XX

Autoconf (under Ubuntu to install sudo apt-get installation autoconf)

./configure

Make

Make install (may report permissions issues, I am switching to root under the compiler installation, easy)

Finally, enter Git--version to view the version.


Upgrade git version under Ubuntu (source code compiled to install git)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.