Installing git on CentOS and Dependencies hell

Got problems with GIT on CentOS?I was trying to install GIT on a CentOS 6.2 development server and ran into very odd problem:
[cc lang=”text” escaped=”true”]# yum install git
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* epel: nl.mirror.eurid.eu
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package git.x86_64 0:1.7.4.1-1.el5 will be installed
–> Processing Dependency: perl-Git = 1.7.4.1-1.el5 for package: git-1.7.4.1-1.el5.x86_64
–> Processing Dependency: perl(Git) for package: git-1.7.4.1-1.el5.x86_64
–> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.7.4.1-1.el5.x86_64
–> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.7.4.1-1.el5.x86_64
–> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.7.4.1-1.el5.x86_64
–> Processing Dependency: libssl.so.6()(64bit) for package: git-1.7.4.1-1.el5.x86_64
–> Running transaction check
—> Package compat-expat1.x86_64 0:1.95.8-8.el6 will be installed
—> Package git.x86_64 0:1.7.4.1-1.el5 will be installed
–> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.7.4.1-1.el5.x86_64
—> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed
—> Package perl-Git.x86_64 0:1.7.4.1-1.el5 will be installed
–> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.7.4.1-1.el5.x86_64
–> Finished Dependency Resolution
Error: Package: git-1.7.4.1-1.el5.x86_64 (epel)
Requires: libcurl.so.3()(64bit)
Error: Package: perl-Git-1.7.4.1-1.el5.x86_64 (epel)
Requires: perl(:MODULE_COMPAT_5.8.8)[/cc]
So there are these two errors, missing libcurl and compat module, which I checked and were installed and running under /usr/sbin

The other message that gets your attention is:
[cc lang=”text” escaped=”true”]There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.[/cc]
I tried to run that but hit another rock:
[cc lang=”text” escaped=”true”]# bash: yum-complete-transaction: command not found[/cc]
So that was logical and completely my mistake just run:
[cc lang=”text” escaped=”true”]yum install yum-utils[/cc]
OK now all was there, I cleaned the unfinished transactions but I got same error as in the beginning. And finally the solution I found is to run install with EPEL repository disabled:
[cc lang=”text” escaped=”true”]# yum install git –disablerepo=epel[/cc]
All was installed and running as a charm. Hopefully this could help you as well.

NOTE: Git and Perl dependencies breaking the yum update

To fix that issue you can add the following line to your /etc/yum.repos.d/epel.repo file to exclude those packages and tell yum not to look into EPEL repository for them:
[cc lang=”text” escaped=”true”][epel]
name=Extra Packages for Enterprise Linux 5 – $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
exclude=perl* git*[/cc]

It's only fair to share...Buffer this pageShare on Facebook0Tweet about this on TwitterShare on Google+0Share on LinkedIn0Share on Reddit0Pin on Pinterest0Email this to someone
About

Just a guy with strong interest in PHP and Web technologies

Posted in CentOS, Servers Tagged with: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*