Centos 7 upgrade/install git 2.7.3

Source: Internet
Author: User

Centos 7 upgrade/install git 2.7.3
1. Install the required software package

# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel # yum install gcc perl-ExtUtils-MakeMaker
2. Download and install
# cd /usr/src# wget https://www.kernel.org/pub/software/scm/git/git-2.7.3.tar.gz# tar xzf git-2.7.0.tar.gz
# cd git-2.7.0# make prefix=/usr/local/git all# make prefix=/usr/local/git install# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc# source /etc/bashrc
3. Check the version
# git --version
O. Others

Centos comes with Git, and 7.x comes with git 1.8.3.1 (which should be, or may not). you need to use it before installing the new version.yun remove gitUninstall (you can also uninstall it after installation ).

Runmake prefix=/usr/local/git allError may be reported: make: * [git-credential-store] Error 1. You can use the following command to replace

# ./configure --without-iconv# make CFLAGS=-liconv prefix=/usr/local/git all# make CFLAGS=-liconv prefix=/usr/local/git install

Related Article

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.