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