Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Is PERL5LIB Problem Associated with Perl RPM Upgrade?

by dave_aiello (Pilgrim)
on Nov 26, 2002 at 06:15 UTC ( [id://215797]=perlquestion: print w/replies, xml ) Need Help??

dave_aiello has asked for the wisdom of the Perl Monks concerning the following question:

I have been building a test server with RedHat 7.2 to experiment with Interchange 4.8.6. RedHat 7.2 came with Perl 5.6.0, but I had to upgrade to 5.6.1 because of dependency issues with some of the RPMs that are part of Interchange.

When I upgraded from Perl 5.6.0 to 5.6.1, my PERL5LIB was apparently left unchanged. As a result, all of the entries in PERL5LIB still point to the directories for Perl 5.6.0 instead of 5.6.1.

In a situation where I was writing a very simple Perl application entirely by myself, I'd probably just do use lib qw(/usr/lib/perl5/5.6.1/i386/linux ...); and not worry about it. But it's not that simple in this case. I even have problems with Apache because when I run /usr/sbin/apachectl start, I get "Cant locate strict.pm in @INC" when strict.pm is simply in the 5.6.1 directories instead of 5.6.0.

So, my questions:

  • Are other monks experiencing the same problems with PERL5LIB after updating Perl via RPM?
  • What is the best way to correct the PERL5LIB universally for the machine and move on?
FWIW, I would not be trying to install everything using RPMs, were it not for the fact that I have to document a repeatable server build process, and other developers and system admins need to be able to follow it. Every one of the people who might follow my documentation has less experience with Perl than I do.

Dave Aiello
Chatham Township Data Corporation

  • Comment on Is PERL5LIB Problem Associated with Perl RPM Upgrade?

Replies are listed 'Best First'.
Re: Is PERL5LIB Problem Associated with Perl RPM Upgrade?
by chromatic (Archbishop) on Nov 26, 2002 at 06:35 UTC

    I'm not running Red Hat, nor do I like to upgrade Perl via RPM, but it sounds as if you need to update your mod_perl instead. Starting Apache oughtn't cause Perl to do anything unless it's linked in to Apache and runs things at startup. Otherwise, I'd expect /etc/profile to have a global definition for PERL5LIB.

    This is just an intuitive leap, though. :)

      chromatic:

      I tried modifying /etc/profile to explicitly set PERL5LIB, but that resulted in different Perl-related errors on apachectl start. So, I downloaded the newest mod_perl module available in the RedHat 7.2 channel on the Red Hat Network, installed it using rpm -U, and that fixed the apache startup problem.

      When I got it running, I began to think, "I wonder if the problem would have been resolved if I uninstalled and reinstalled the original version of the mod_perl RPM?" Maybe I'll pursue that next time I'm in a jam like this.

      All in all, I'd rather use Perl in a Perlish way, and not in a way that is so dependent on the Linux distro that we are currently using.

      Dave Aiello
      Chatham Township Data Corporation

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://215797]
Approved by Courage
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found