Categories: Hostripples Featured

How to install Git on CentOS running cPanel

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


HR-ADMIN

Recent Posts

The Ultimate Guide to DIY Website Builders for Entrepreneurs

Ah, the joys of building a website! Picture this: You're sitting there in your pajamas, coffee in hand, ready to…

1 week ago

Don’t Ignore These 11 Signs You Need a Hosting Upgrade

Are you feeling like your website is running in slow motion? It can be frustrating when your online presence doesn't…

2 weeks ago

PrestaShop vs OpenCart: Which Is Right for Your Business?

Are you ready to take your online store to the next level? Whether you're running a PrestaShop or OpenCart platform,…

4 weeks ago

Sitemaps: A Guide to Enhancing Online Visibility

Picture this: your website is like a fabulous party happening in the darkest corner of the internet, but nobody's showing…

1 month ago

Step-by-Step Guide to Implementing a CDN for WordPress

Picture this: Your WordPress site is like that one friend who's always fashionably late to everything. You know, the one…

2 months ago