Main image
7th May
2010
written by Nick Anderson

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
Tags: , ,

32 Comments

  1. 26/08/2010

    Thanks for this – really was stumped and you are the only Google result that helped.

  2. 26/08/2010

    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.

  3. Alex Windows other version Firefox 3.6.10
    23/09/2010

    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!

  4. Chris Kimpton Mac OS X Firefox 3.6.10
    24/09/2010

    Many thanks, fixed it for me too :)

  5. Jason F Mac OS X Google Chrome 7.0.517.44
    23/11/2010

    This was the perfect fix for me – thanks a ton!

  6. never saw it coming Windows XP Firefox 3.6.13
    29/12/2010

    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.

  7. 29/12/2010

    Glad you found it useful. Its always nice to get feedback. Thanks for taking the time to post a comment.

  8. 31/12/2010

    Thanks for the post. Solved my problem.

  9. Jim Windows XP Firefox 3.6.13
    06/01/2011

    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??

  10. 06/01/2011

    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.

  11. 08/04/2011

    Fantastic cheers!

  12. 09/04/2011

    Great, glad you found it useful

  13. 13/06/2011

    Googled for awhile before stumbling upon this. Fixed all of my issues, thanks!

  14. 27/06/2011

    Glad you found it useful!

  15. François Maillet Mac OS X Firefox 6.0
    09/07/2011

    Worked like a charm. Thanks!

  16. 11/07/2011

    Happy to help

  17. 31/08/2011

    Thanks for the post! I hate cpanel sometimes.

  18. 31/08/2011

    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!

  19. 13/09/2011

    Thanks for this! Bloody cPanel.

  20. tnk2k Linux Google Chrome 15.0.874.21
    04/10/2011

    thanks, lifesaver!

  21. 04/10/2011

    Glad you found it useful.

  22. TA Windows XP Firefox 7.0.1
    18/10/2011

    Thank you so much! Worked perfectly.

  23. 18/10/2011

    Glad to know it helped.

  24. John Mac OS X Google Chrome 14.0.835.186
    31/10/2011

    Thanks – saved me too (curses cPanel under breath)

  25. 06/01/2012

    You’re a life saver. Great job. This worked beautifully.

  26. Mike Windows other version Firefox 10.0
    16/01/2012

    Help, I’m getting

    [root@host ~]# yum –disableexcludes=main install git
    usage: yum [options]

    Command line error: no such option: –disableexcludes

  27. 16/01/2012

    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

  28. Mike Windows other version Firefox 10.0
    17/01/2012

    I think i tried one and two dashes, which is correct?

  29. randeep singh Windows other version Google Chrome 17.0.963.44
    27/01/2012

    bravo! it was lifesaver cmd. u made my day. thanx!

  30. Roy Windows other version Google Chrome 16.0.912.77
    05/02/2012

    I get this:

    http://pastebin.com/4YaxPtH7

    What should I do?

    Centos 5.7

  31. 05/02/2012

    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.

  32. Roy Windows Vista Google Chrome 16.0.912.77
    05/02/2012

    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.

Leave a Reply

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha

BLOGROLL

ARCHIVE