I have a love/hate relationship with cpanel. On one hand it makes low end hosting a breeze, on the other its a huge pita if you want to do anything “outside the box”. Perhaps it’s not such a pain if you work with cpanel frequently. But I find cpanel beneficial because it aids in tasks that I don’t do frequently, and can offload many of those tasks to less technical people.

I was recently setting up a cpanel instance for someone and had the need to install git for version control. I configured the epel repository for use as usual and went to yum install git only to be met with a nasty error.

git-1.5.5.6-2.el5.i386 from epel has depsolving problems

–> Missing Dependency: perl(Error) is needed by package git-1.5.5.6-2.el5.i386 (epel) git-1.5.5.6-2.el5.i386 from epel has depsolving problems –> Missing Dependency: perl-Git = 1.5.5.6-2.el5 is needed by package git-1.5.5.6-2.el5.i386 (epel) git-1.5.5.6-2.el5.i386 from epel has depsolving problems –> Missing Dependency: perl(Git) is needed by package git-1.5.5.6-2.el5.i386 (epel) Error: Missing Dependency: perl(Git) is needed by package git-1.5.5.6-2.el5.i386 (epel) Error: Missing Dependency: perl(Error) is needed by package git-1.5.5.6-2.el5.i386 (epel) Error: Missing Dependency: perl-Git = 1.5.5.6-2.el5 is needed by package git-1.5.5.6-2.el5.i386 (epel)

I was pretty surprised as I have installed git without issue before on CentOS boxes before. A bit of digging showed that installing cpanel actually made some modifications to my /etc/yum.conf.

exclude=apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*

So cpanel has blocked all perl packages from being installed or updated because they don’t want updates to break or conflict with their packages. Thankfully yum provides a nice one time workaround for this kind of situation.

–disableexcludes=[repo]

disable exclude from main, for a repo or for

everything

So one command later and I now have git installed.

yum --disableexcludes=main install git