4

I am not an Unix/Linux admin.

I was attempting to install git on our server, and after much googling and trial and error, I discovered that perl* is excluded in our yum.conf file, preventing perl-Git from installing, which is a dependency of git-core. I understand what this does, but I'm not sure why it has been done. There are a lot of things excluded in this file, and I just want to understand the reasons one might want to exclude something, whether it's a security issue, or what.

Our original server administrator was killed in a boating accident. We are using CentOS 5.4, and I am using yum for my attempts at installing git.

  • condolences. now change control++ and preparing for hit by a bus scenario's ++ document everything – xenoterracide Jan 17 '11 at 15:01
7

It might make sense to temporarily exclude a package from installation if the available version is known to be buggy, though this would rarely occur on a server where one generally installs distributions that don't update often except for bug fixes.

A reason that comes to mind for excluding perl specifically is if there is a separate installation of perl, possibly directly from CPAN, possibly shared or synchronized with other machines on the network to ensure consistent sets of installed libraries and versions. Look in /usr/local or opt for an alternate perl installation, check for a PERL5LIB setting in /etc/profile. I wouldn't do it that way, because as you noticed it will break dependencies, but I can see why someone might be tempted.

Maybe if you post the full set of exclusions someone will spot a pattern. Is there any comment in the file that might give a hint?


To avoid this kind of issue in the future, you should put all configurations under version control. Then the changelog would indicate when the surprising configuration was set up, and hopefully why.

On Debian/Ubuntu I use etckeeper, which I think has been packaged for CentOS too. On a multi-administrator machine, it should be set up never to commit changes automatically, forcing the administrator to make an explicit commit before they can run yum install or yum update.

6

cPanel keeps track own copy of Perl. The default install adds that exclude rule. I think they do it because many people rely heavily on cPanel working and doing all server the work and there may have been issues in the past regarding the packages and Perl.

You can install git by using the --disableexcludes option to disable the excludes on the repository:

yum --disableexcludes=epel install git
  • Thank you!! This is probably what has happened, as we do use cPanel. Will installing a second(?) version of perl cause problems with cPanel? – David Smith Jan 17 '11 at 12:38
  • @BigDave the exclude line for this excludes all packages that match the pattern "perl*", more likely than not, there is already a perl package installed. I would be hesitant if yum prompted to install perl when using the excludes, with git specifically, it was only installing a package called "perl-Git" which seemed reasonable. – Reece45 Oct 3 '12 at 14:21
1

It is unlikely that installing Perl into its normal root will interfere with cPanel, depending on the configuration. What does which perl return?

Technically you can install Git, or even Git plus its dependencies, without having Perl installed. Please note that doing so may affect certain functionality within Git.

yum -y install yum-downloadonly && yum install --downloadonly --downloaddir=/foo/bar/ git

This will download current rpm's for Git and its dependencies (perl-Error and perl-Git) to /foo/bar/. Now you can rpm -ivh --nodeps /foo/bar/{git,perl-{Error,Git}}*.rpm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.