12

I'm trying to install GIT by either RPM or YUM but i can't. I get the following error:

error: Failed dependencies:
        libcrypto.so.10 is needed by git-1.7.1-2.el6.i686
        libcurl.so.4 is needed by git-1.7.1-2.el6.i686
        libexpat.so.1 is needed by git-1.7.1-2.el6.i686
        libssl.so.10 is needed by git-1.7.1-2.el6.i686
        libz.so.1 is needed by git-1.7.1-2.el6.i686
        perl(Error) is needed by git-1.7.1-2.el6.i686
        perl(Git) is needed by git-1.7.1-2.el6.i686
        perl-Git = 1.7.1-2.el6 is needed by git-1.7.1-2.el6.i686

When running yum install git:

root@server [/usr/local/src]# yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.symnds.com
 * extras: mirror.atlanticmetro.net
 * updates: mirror.trouble-free.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.7.1-2.el6_0.1 set to be updated
--> Processing Dependency: perl-Git = 1.7.1-2.el6_0.1 for package: git-1.7.1-2.el6_0.1.x86_64
--> Processing Dependency: perl(Git) for package: git-1.7.1-2.el6_0.1.x86_64
--> Processing Dependency: perl(Error) for package: git-1.7.1-2.el6_0.1.x86_64
--> Finished Dependency Resolution
Error: Package: git-1.7.1-2.el6_0.1.x86_64 (updates)
           Requires: perl(Error)
Error: Package: git-1.7.1-2.el6_0.1.x86_64 (updates)
           Requires: perl-Git = 1.7.1-2.el6_0.1
Error: Package: git-1.7.1-2.el6_0.1.x86_64 (updates)
           Requires: perl(Git)
 You could try using --skip-broken to work around the problem
bandmin-1.6.1-5.noarch has missing requires of perl(bandmin.conf)
bandmin-1.6.1-5.noarch has missing requires of perl(bmversion.pl)
bandmin-1.6.1-5.noarch has missing requires of perl(services.conf)
exim-4.69-30_cpanel_maildir.x86_64 has missing requires of perl(SafeFile)
frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0

Repo List:

repo id                       repo name                                status
base                          CentOS-6 - Base                          5,664+355
extras                        CentOS-6 - Extras                                1
updates                       CentOS-6 - Updates                          991+51
repolist: 6,656

The server is running the latest WHM/cPanel.

How to fix that?

3
  • Did you try installing the missing libraries and packages? Dec 3 '11 at 21:05
  • 1
    If he is installing via yum, it should have resolve the dependencies. @Tom, can you do a command "yum repolist" and paste in your question?
    – Rilindo
    Dec 3 '11 at 21:23
  • To workaround yum errors, try to use yum shell commands. Here's how I've upgraded from git 1.8 to git 2.24: serverfault.com/a/1045216/91648
    – Noam Manos
    Dec 6 '20 at 17:10
17

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
1
3

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
4
  • Neither worked, Still requiring perl-git and perl-error Dec 3 '11 at 21:53
  • Okay, updated response with the third option.
    – Rilindo
    Dec 3 '11 at 22:01
  • Installed git-Error, but can't install perl-Git, It says: error: Failed dependencies: git = 1.7.1-2.el6_0.1 is needed by perl-Git-1.7.1-2.el6_0.1.noarch Dec 3 '11 at 22:32
  • Okay, download gtlib.gatech.edu/pub/centos/6.0/updates/x86_64/RPMS/… then do yum localinstall git-1.7.1-2.el6_0.1.x86_64.rpm perl-Git-1.7.1-2.el6_0.1.noarch.rpm
    – Rilindo
    Dec 3 '11 at 22:39
2

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.

4
  • It does find perl-Git or perl-Error Dec 3 '11 at 21:20
  • Okay, remove the two perl packages and try to install git alone.
    – ewwhite
    Dec 3 '11 at 21:22
  • i've updated the post with what i get. Dec 3 '11 at 21:24
  • 1
    Maybe try a yum clean all then run yum install git.
    – ewwhite
    Dec 3 '11 at 21:33
1

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
3
  • 6
    Bah, we have package management for a reason, and you should only go away from package management if you have a very good reason. "yum" not working correctly indicates a problem to be fixed, not ignored.
    – cjc
    Jan 23 '12 at 17:26
  • I'm all for compiling stuff from source when there's a good reason, but in this case that would be a (bad) hack, not a proper fix.
    – voretaq7
    Jan 23 '12 at 21:45
  • @All: For version 1.7 I had no problem for installing/updating to latest version but not possible to upgrade to 1.8.x; Then I used this method to install it with success (even like you I do not like to install without package manager)
    – рüффп
    Aug 11 '14 at 18:43
1

It looks like your repositories are missing some of the additional packages needed to install GIT. Typically I install the Extra Packages for Enterprise Linux repository as well and that fixes a ton of my issues.

It can be found here:

RHEL5 or RHEL6

Install the RHEL6 Repo and you should have access to the additional packages that you are needing.

Best if Luck

1
  • GIT is included in the base CentOS distributions, so this is not entirely accurate.
    – Rilindo
    Jan 23 '12 at 20:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.