Can't install GIT on a CentOS 6.0 x64

13,825

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

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

Solution 5

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
Share:
13,825

Related videos on Youtube

CodeOverload
Author by

CodeOverload

Updated on September 18, 2022

Comments

  • CodeOverload
    CodeOverload almost 2 years

    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?

    • dkaragasidis
      dkaragasidis over 12 years
      Did you try installing the missing libraries and packages?
    • Rilindo
      Rilindo over 12 years
      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?
    • Noam Manos
      Noam Manos over 3 years
      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
  • CodeOverload
    CodeOverload over 12 years
    It does find perl-Git or perl-Error
  • ewwhite
    ewwhite over 12 years
    Okay, remove the two perl packages and try to install git alone.
  • CodeOverload
    CodeOverload over 12 years
    i've updated the post with what i get.
  • ewwhite
    ewwhite over 12 years
    Maybe try a yum clean all then run yum install git.
  • Rilindo
    Rilindo over 12 years
    Okay, updated response with the third option.
  • CodeOverload
    CodeOverload over 12 years
    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
  • Rilindo
    Rilindo over 12 years
    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
  • cjc
    cjc over 12 years
    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.
  • Rilindo
    Rilindo over 12 years
    GIT is included in the base CentOS distributions, so this is not entirely accurate.
  • рüффп
    рüффп almost 10 years
    @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)