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
Identica
Twitter
LinkedIn
Thanks for this – really was stumped and you are the only Google result that helped.
I’m glad it helped you out.
Im sure you are aware, but that –disable excludes=main flag works for installing other packages that error out.
I’m with Steven Grant. Your little one-liner helped me out just nicely. I was seriously stumped as all other guides for installing Git just said “do yum install git” and didn’t say what to do if anything goes wrong!
Many thanks, fixed it for me too
This was the perfect fix for me – thanks a ton!
THANK YOU!!!! After an hour of dealing with untraceable perl installation failures, I found this on Google. Installed git in 20 seconds using your one-liner.
Glad you found it useful. Its always nice to get feedback. Thanks for taking the time to post a comment.
Thanks for the post. Solved my problem.
I was hoping this would solve it for me but I get this error message:
Command line error: no such option: –disableexcludes
This is on centos 5.1
Any other workaround??
Looks like the –disableexcludes option dosnt exist in centos 5.1
What I would do is comment out the excludes line in /etc/yum.conf, install git, then comment the line back out.
Fantastic cheers!
Great, glad you found it useful
Googled for awhile before stumbling upon this. Fixed all of my issues, thanks!
Glad you found it useful!
Worked like a charm. Thanks!
Happy to help
Thanks for the post! I hate cpanel sometimes.
Sweet Muffins! I appreciate you taking the time to post this. It was a quick and simple help. Also if you’r having issues with your GPG key retrieval you can use use –nogpgcheck to get around it. YaY!!!! Subvert Security AND Authority!
Thanks for this! Bloody cPanel.
thanks, lifesaver!
Glad you found it useful.
Thank you so much! Worked perfectly.
Glad to know it helped.
Thanks – saved me too (curses cPanel under breath)
You’re a life saver. Great job. This worked beautifully.
Help, I’m getting
[root@host ~]# yum –disableexcludes=main install git
usage: yum [options]
Command line error: no such option: –disableexcludes
What version of CentoOS or RHEL are you running? Also I can’t tell from the formatting are your using two dashes? yum dash dash disableexcludes
I think i tried one and two dashes, which is correct?
bravo! it was lifesaver cmd. u made my day. thanx!
I get this:
http://pastebin.com/4YaxPtH7
What should I do?
Centos 5.7
Looks like its a key error, you can install the key for the repo or you could try passing the –nogpgcheck option to yum as well.
Right now its working and all but my local machine says it did a good push to the remote.
But when I check my files nothing is there.