Can't install GIT on a CentOS 6.0 x64

Solution 1:

As you can see from this post in the cPanel forums, cPanel/WHM opts to install its own version of Perl from source so it blacklists the perl* packages that could be pulled in by yum in /etc/yum.conf.

The solution is to temporarily ignore the excludes directive while yum sorts out the dependencies for Git:

yum install git --disableexcludes=main --skip-broken

Solution 2:

It looks like while you are installing git for the first time, it is pulling from the update repo first - which has git-1.7.1-2.el6_0.1.x86_64.rpm (as opposed to git-1.7.1-2.el6.x86_64.rpm).

There are two options to approach this:

Install git from the base and disable the update repo temporarily with:

yum -y install git --disablerepo=updates

or

Apply most of the current updates with:

yum -y upgrade

And then run the git install again, so that you can satisfy your current dependencies with the updated version of git.

I suggest former approach, as you don't want to apply updates if you don't have a regression plan.

EDIT: Okay, since it can't seem to resolve the dependencies or it is going to a repo that does have those updates rpm, download the RPM from these locations:

http://www.gtlib.gatech.edu/pub/centos/6.0/updates/x86_64/RPMS/perl-Git-1.7.1-2.el6_0.1.noarch.rpm

http://www.gtlib.gatech.edu/pub/centos/6.0/os/x86_64/Packages/perl-Error-0.17015-4.el6.noarch.rpm

and then install through yum with:

yum localinstall perl-Error-0.17015-4.el6.noarch.rpm perl-Git-1.7.1-2.el6_0.1.noarch.rpm

and the try to install git again. If necessary, download git itself and install with:

yum localinstall perl-Error-0.17015-4.el6.noarch.rpm perl-Git-1.7.1-2.el6_0.1.noarch.rpm git-1.7.1-2.el6_0.1.x86_64.rpm

Solution 3:

The first group of errors you posted indicate that you were trying to rpm install a 32-but version of git. This is a 64-bit system, though.

Did you run yum install git ? It should have resolved your dependency chain. Clean your yum cache with yum clean all.

If no, you will need to install the following dependencies...

yum install openssl libcurl expat zlib perl-Git perl-Error

Try installing git via yum install git following that.

Solution 4:

Just download and compile from source.

mkdir /home/sources
cd /home/sources
wget http://git-core.googlecode.com/files/git-1.7.8.4.tar.gz
tar -zxf git-1.7.8.4.tar.gz
cd git-1.7.8.4
./configure
make
make install