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

Hi, I have two perl versions installed on my solaries box, one in /usr/bin/perl5.8.4 and local folder tools\sol\perl5.8.8. I want to install perl modules using my local copy. How can I do it? Thanks

Replies are listed 'Best First'.
Re: perl installation
by Corion (Patriarch) on Mar 07, 2008 at 07:00 UTC

    Launch the cpan shell of your local copy instead of launching the global version:

    tools/sol/perl5.8.8/bin/cpan

    instead of

    cpan

    Also, you might want to adjust $ENV{PATH} so that /home/user/ygp/tools/sol/perl5.8.8/bin is found before /usr/bin.

      Hi, i added env as
      export PERLLIB=/tools/sol/perl/lib
      and did (I am installing module in local directory)
      $ perl Makefile.PL PREFIX=/Perl_Modules
      Perl lib version (v5.8.8) doesn't match executable version (v5.8.4) at /tools/sol/perl/lib/Config.pm line 46.
      Compilation failed in require at tools/sol/perl/lib /ExtUtils/MakeMaker/Config.pm line 6. BEGIN failed--compilation aborted at /tools/sol/perl /lib/ExtUtils/MakeMaker/Config.pm line 6. Compilation failed in require at /tools/sol/perl/lib /ExtUtils/MakeMaker.pm line 7. BEGIN failed--compilation aborted at /tools/sol/perl /lib/ExtUtils/MakeMaker.pm line 7. Compilation failed in require at Makefile.PL line 1. BEGIN failed--compilation aborted at Makefile.PL line 1.

        Yes. Along with launching your local version of cpan, you also need to launch your local version of perl. Which is why I recommended adjusting $ENV{PATH} so your local Perl gets found first. The error message explains that well:

        Perl lib version (v5.8.8) doesn't match executable version (v5.8.4)

        You're running perl5.8.4 but you have set up the Perl libraries to point to those of 5.8.8. To fix this, you need to launch the 5.8.8 Perl as well. Do:

        /tools/sol/perl/bin/perl Makefile.PL PREFIX=/Perl_Modules

        instead of using

        perl Makefile.PL PREFIX=/Perl_Modules
        Don't do that then