Install Git on CentOS

Source: Internet
Author: User
Tags install openssl install perl
In CentOS, yum does not contain Git. you need to install it manually. First install the git dependency package yuminstallcurlyuminstallcurl-develyuminstallzlib-develyuminstallopenssl-develyuminstallperlyuminstallcpioyuminstal

In CentOS, yum does not contain Git. you need to install it manually.

First, install the git dependency package.


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 latest git package


Wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
Tar xzvf git-latest.tar.gz
Cd git-xxxx-xx
Autoconf
./Configure
Make | make install

Verify whether the installation is successful: check the installed version


Git -- version

------------------------ Updated on the 12-18 day --------------------

A friend suggested that an error may occur after checking the preceding dependency packages, as shown below:


/Usr/bin/perl Makefile. pl prefix = '/usr/local' INSTALL_BASE = ''-- localedir ='/usr/local/share/locale'
Can't locate ExtUtils/MakeMaker. pm in @ INC (@ INC contains: /usr/local/lib/perl5/usr/local/share/perl5/usr/lib/perl5/vendor_perl/usr/share/perl5/vendor_perl/usr/lib/perl5/usr /share/perl5 .) at Makefile. PL line 3.
BEGIN failed -- compilation aborted at Makefile. PL line 3.
Make [1]: *** Error 2
Make: *** Error 2

The prompt is a perl problem. use yum search perl-devel to find out some packages.


Yum install perl-devel.i686

Continue make | make install. Successful!

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.