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
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:
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
Related videos on Youtube
CodeOverload
Updated on September 18, 2022Comments
-
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 over 12 yearsDid you try installing the missing libraries and packages?
-
Rilindo over 12 yearsIf 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 over 3 yearsTo 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 over 12 yearsIt does find
perl-Git
orperl-Error
-
ewwhite over 12 yearsOkay, remove the two perl packages and try to install
git
alone. -
CodeOverload over 12 yearsi've updated the post with what i get.
-
ewwhite over 12 yearsMaybe try a
yum clean all
then runyum install git
. -
Rilindo over 12 yearsOkay, updated response with the third option.
-
CodeOverload over 12 yearsInstalled 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 over 12 yearsOkay, 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 over 12 yearsBah, 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 over 12 yearsGIT 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)