Installing git 1.9.0 on RHEL


Installing git was quite some pain today 😦 Was trying to find the RPM but couldn’t. Tried using the YUM, but no success once again 😦 So I went for the manual install of (g)it 😉

Below are the steps I followed.

  • Download git tarball & its  signature file from this link.
  • Place this tarball inside /usr/src.
  • Run tar xzf git-1.9.0.tar.gz
  • cd git-1.9.0
  • make prefix=/usr/bin/git
  • make prefix=/usr/bin/git install
  • echo “export PATH=$PATH:/usr/bin/git/bin” >> /etc/bashrc
  • source /etc/bashrc
  • Restart your session or open a new session.
  • Verify by issuing git –version

[root@server git-1.9.0]# git –version
git version 1.9.0
[root@server git-1.9.0]# which git
/usr/local/bin/git

P.S. You may receive below errors while installing git. So, make sure you have installed these packages before trying to install git :- 

libcurl-devel.x86_64
expat-devel.x86_64
zlib-devel.x86_64
openssl-devel.x86_64

Errors :-

* new build flags cc credential-store.o in file included from credential-store.c:1: cache.h:19:18: warning: zlib.h: no such file or directory in file included from credential-store.c:1: cache.h:21: error: expected specifier-qualifier-list before ‘z_stream’ make: *** [credential-store.o] error 1

http.c:1578: error: ‘struct http_object_request’ has no member named ‘slot’

P.P.S. – If somehow, above steps fail. Try below steps : –

  • cd /usr/src/git-1.9.0
  • ./configure
  • make
  • make install
  • which git
  • Then export the path using the same method as described above, just change that to /usr/local/bin/git

This is the default setting 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s