Skip to content

Instantly share code, notes, and snippets.

@matthewriley
Last active October 24, 2018 01:48
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save matthewriley/4694850 to your computer and use it in GitHub Desktop.
Save matthewriley/4694850 to your computer and use it in GitHub Desktop.
Install Git 1.8.1.2 from source on CentOS 6.3

Install Git 1.8.1.2 from source on CentOS 6.3

These are the Terminal commands I recently used (Feb 2013) to install Git 1.8.1.2 from source on CentOS 6.3. I ran this in a VirtualBox VM after a fresh install from the ISO.

You mileage will vary as the yum packages are updated over time. The yum install line below should include all the dependencies, at least it did for me. Eventually yum install git will include 1.8.x but until then I hope this helps.

cd ~/Downloads
su
yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
exit
wget -O v1.8.1.2.tar.gz https://github.com/git/git/archive/v1.8.1.2.tar.gz
tar -xzvf ./v1.8.1.2.tar.gz
cd git-1.8.1.2/
su
make prefix=/usr/local all
make prefix=/usr/local install
exit

October 2013 update: Install Git 1.8.4.1 from source on CentOS 6.4

@Rican7
Copy link

Rican7 commented Apr 22, 2013

Thanks!
It was nice to find a dependency list like this. :)

@magickatt
Copy link

Great, just what I was looking for! Works with no issues, and is a lot simpler than other people's examples

@navaru
Copy link

navaru commented Jul 3, 2013

thank you :)

Copy link

ghost commented Aug 2, 2013

just tried for newest v1.8.4-rc1 and still works fine. Just change wget params as: 'wget -O git-v1.8.4-rc1 https://github.com/git/git/archive/v1.8.4-rc1.tar.gz' thanks..

@mikewaters
Copy link

For git 2.x, you will need some other perl deps, like perl-ExtUtils-MakeMaker-. I cannot say which ones exactly though, since the installation of cpan (to install the perl libs) actually satisfied the git dependencies.

sudo yum install -y cpan

@wanghao8080
Copy link

Thanks !感谢!

@thuai
Copy link

thuai commented Jan 23, 2015

It's working! Thanks!
And I also excute sudo yum install -y cpan

@andrezimpel
Copy link

Saved my life bro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment