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!