Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Multiple Perl Installations

by andreychek (Parson)
on Jul 01, 2001 at 10:41 UTC ( #92995=note: print w/replies, xml ) Need Help??

in reply to Multiple Perl Installations

Oddly enough, a very similar question was posted about half an hour by clive_;-), and my answer to it may well be relevant (as well as the answers of other folks).

I'll only tackle your question regarding how to make CPAN look elsewhere, others here can answer your other questions much better then myself :-) First off, I highly recommend reading his question and the answers to it. What it comes down to though, are these two hacks to get Perl to look in the right place for your modules:

  • The shell environment variable PERL5LIB acts just as @INC does.. or better said, it's like saying "use lib". Perl will search for modules in any directory listed in that variable, so you could set it for a particular user, or for the entire system in a login script.

  • Secondly, you could always remove the 5.6.0 dirs under /usr/lib/perl5, and then symlink /usr/lib/perl5 to /usr/local/lib/perl5. This would get @INC looking in the right place. While it is a hack around another problem on your system, it would certaintly get you running quickly, and by all means there's nothing wrong with that.. it's just treating the symptom though, not the actual problem.

    Again, those two points were in my previous post, but have been modified slightly for your particular problem.

    The fact that CPAN ends up installing a new version of Perl for you is a horrible bug that I won't even get into describing my feelings about here :-)

    There are ways to have multiple copies of Perl running on one system. I talked to people at YAPC who had done it. However, it seems to be quite tricky, and I wouldn't recommend it if you don't need it... the people I talked to used it simply because they wanted to test modules under multiple versions of Perl. Knowing that, I would recommend deleting one copy of Perl if you don't need it, or you may run into continous problems with both attempting to coexist on your box. If you choose to try the symlink option I mentioned above, it would be perl 5.6.0 you'd delete. Unfortunatly, you would get the same horrible error messages from RPM if you attempted to remove 5.6.0. You could always just rename the dirs and the perl binary. Just a thought. Good luck,
  • Log In?

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://92995]
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (5)
    As of 2018-05-26 06:41 GMT
    Find Nodes?
      Voting Booth?