How to install Git on CentOS running cPanel

How to install Git on CentOS running cPanel

56
0
SHARE
Linux Reseller Hosting

Recently when working on creating a new bash script to calculate inode usage I attempted to install Git on a CentOS 5 cPanel server and got a lot of perl errors. After running the install command from yum as you can see in the output below it was complaining about dependencies.

Here’s a few of the errors that I received when trying to install

# yum install git-core

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirror.team-cymru.org
* base: yum.singlehop.com
* epel: mirrors.servercentral.net
* extras: mirror.steadfast.net
* rpmforge: fr2.rpmfind.net
* updates: pubmirrors.reflected.net
Excluding packages in global exclude list
Finished
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package git.i386 0:1.7.3-1.el4.rf set to be updated
–> Processing Dependency: perl-Git = 1.7.3-1.el4.rf for package: git
–> Processing Dependency: libcrypto.so.4 for package: git
–> Processing Dependency: perl(DBI) for package: git
–> Processing Dependency: libssl.so.4 for package: git
–> Processing Dependency: perl(Git) for package: git
–> Running transaction check
—> Package git.i386 0:1.7.3-1.el4.rf set to be updated
–> Processing Dependency: perl-Git = 1.7.3-1.el4.rf for package: git
–> Processing Dependency: perl(DBI) for package: git
–> Processing Dependency: perl(Git) for package: git
—> Package openssl097a.i386 0:0.9.7a-9.el5_4.2 set to be updated
–> Finished Dependency Resolution
git-1.7.3-1.el4.rf.i386 from rpmforge has depsolving problems
–> Missing Dependency: perl(DBI) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
git-1.7.3-1.el4.rf.i386 from rpmforge has depsolving problems
–> Missing Dependency: perl(Git) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
git-1.7.3-1.el4.rf.i386 from rpmforge has depsolving problems
–> Missing Dependency: perl-Git = 1.7.3-1.el4.rf is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
error: Missing Dependency: perl(DBI) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
Error: Missing Dependency: perl(Git) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
Error: Missing Dependency: perl-Git = 1.7.3-1.el4.rf is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
You could try using –skip-broken to work around the problem
You could try running: package-cleanup –problems
package-cleanup –dupes
rpm -Va –nofiles –nodigest

After searching around and doing a little bit of research I figured out the problem was related to cPanel itself. cPanel was blocking the installation of any Perl modules to prevent it from conflicting with their packages.

Thankfully though there is a really simple way through Yum to install Git and bypass this block from cPanel.

# yum –disableexcludes=main install git

We add in the –disableexcludes=main and you should be able to install Git without any problems.

If you end up having problems with cPanel afterwards (which I have not experienced), you can Run this script from cPanel to check the Perl modules installed.

# /scripts/checkperlmodules

Windows Shared Hosting

Our Partner

partner-cloudflare
partner-cloudlinux
partner-cpanel-whm
partner-Paralleles-plesk-panel
partner-sitelock
partners-OpenVZ
R1Soft
partners-RV-Globalsoft
partners-Softaculous-auto-installer
partners-solusvm
partners-whmcs
services-cpanel
services-MySQL
services-Perl
services-swsoft-plesk
support-sevices-php