CentOS/Fedora installation git1.9.0 tutorial

Source: Internet
Author: User
Tags centos install perl

The current project uses GIT for version management, so it is appropriate to learn how to install GIT. This article describes how to compile and install git1.9.0. Although it is now 2.6.


Run all the commands under root.

Step 1: install the dependency package.

Before you start to compile and install git, you should first install the necessary dependency packages to avoid various problems during the installation process.

# Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker

Step 2: Download and compile git.

You can download the desired version from kernel.org or 1.9.0 as I do.
Switch to the src Directory, download and decompress the git source code.

# Cd/usr/src
Wget https://www.kernel.org/pub/software/scm/git/git-1.9.0.tar.gz
Tar xzf git-1.9.0.tar.gz

Go to the decompressed git directory and execute the compilation.

# Cd git-1.9.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

Step 3: Complete.

Now that you have successfully installed git, you can run the following command to view the git version.
# Git -- version
The current fedora22 already comes with git2.4 and later versions.

Possible problems during installation
Usr/bin/perl Makefile. pl prefix = '/usr/local/git' INSTALL_BASE = ''-- localedir = '/usr/local/git/share/locale'
Can't locate ExtUtils/MakeMaker. pm in @ INC (@ INC contains: /usr/local/lib64/perl5/usr/local/share/perl5/usr/lib64/perl5/vendor_perl/usr/share/perl5/vendor_perl/usr/lib64/perl5/usr /share/perl5 .) <span class = "goog_qs-tidbit goog_qs-tidbit-0"> at Makefile. PL line 3.
BEGIN failed -- compilation aborted at Makefile. PL line 3.
This error occurs because the perl-ExtUtils-MakeMaker dependency is not successfully installed. Run the following command to reinstall the installation.
Yum install perl-ExtUtils-MakeMaker

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.