[CentOS] Perl modules not working properly when installed via yum?

James Olin Oden james.oden at gmail.com
Tue Oct 18 20:03:30 UTC 2005


On 10/18/05, dan.trainor <dan.trainor at gmail.com> wrote:
> Hello, all -
>
> I've been dealing with this problem for quite a while, and most of my
> solutions have just been dirty hacks.  I'd like to find an appropriate
> solution.
>
> I've installed perl modules in the past via yum.  Sure, they get
> installed - but none of my perl applications can find them.  I know that
> this is a long outstanding issue, because I have yet to find a real
> solution.
>
> Since I know nothing of perl, I'll go ahead and ask the stupid questions
> here.  Is @INC defined anywhere in the system, where I can add paths to
> it, to include additional modules?  Is inclusion of modules via @INC
> recursive, or does each path need to be defined seperately?  I've tried
> to define $PERL5LIB, as I was told that this would be prepended to @INC,
> but this does not seem to be the case.
>
@INC is made up of the following paths in the order listed:

    - paths added by the perl code itself
    - paths from PER5LIB (but not if running in taint mode)
    - compiled in paths.

So if you did use PER5LIB it will work as long as:

   - Your not running with taint turned on.
   - The script you are running does not use "use lib".  In this case
it will still
     work but your search order is different (i.e. it gets libs from
the use lib paths
     first, which may not be what you want).

My question is why are the perl modules not being found to begin with?
 If they were built by cpanflute on the distribution your running then
they should be just fine (as well as with the other tool to build rpms
from cpan modules).

Just so you know I build rpm from cpan modules all the time and don't
have this problem.  I do have library path issues but that is because
some closed-source libs we've written go in non-standard places (so I
know how to manipute @INC more than I ever wanted to know).

Cheers...james



More information about the CentOS mailing list