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

Cyberduck and FileZilla: A Comprehensive Comparison

As a web designer and web developer your experience must have reached to new height, right? Further, you need to…

6 hours ago

The Science Behind Social Media Posting Times

In today's digital landscape, timing is everything. Whether you're a social media manager, business owner, or content creator, the success…

1 week ago

Mastering Google Search Console: Tips for New Users

Are you a website owner? Maintaining the website is the prime concern for any website owner. Yes, it’s equally important…

1 week ago

A Comprehensive Guide to Changing and Protecting the WordPress Login URL

If you’ve planned to launch a WordPress website, you might get a question, “How do I log in to WordPress?”…

2 weeks ago

The Ultimate Showdown: Linux vs Windows for VPS Hosting

As the demand for virtual private servers (VPS) continues to grow, businesses and individuals are faced with a crucial decision:…

1 month ago