in reply to Installing modules in personal lib directory - Just canīt make it work

That's a lot of output. Might I recommend some readmore tags? I'm focusing on a couple of lines:

Writing /home/mysite/perl-lib/lib/perl/5.8.4/auto/Text/ExtractWords/.p +acklist
and
# Error: Can't locate Text/ExtractWords.pm in @INC (@INC contains +: /home/.necha/mysite/.cpan/build/Text-Language-Guess-0.01/blib/lib / +home/.necha/mysite/.cpan/build/Text-Language-Guess-0.01/blib/arch /ho +me/mysite/perl-lib/i386-linux-thread-multi /home/mysite/perl-lib/i386 +-linux-thread-multi /home/mysite/perl-lib /etc/perl /usr/local/lib/pe +rl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 +/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . /etc +/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/ +perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/loc +al/lib/site_perl .) at /home/.necha/mysite/.cpan/build/Text-Language- +Guess-0.01/blib/lib/Text/Language/Guess.pm line 15.
From the latter line, we can see your PERL5LIB there as /home/mysite/perl-lib - which is what we expect. However, from the former line, we can see that we're actually installing to /home/mysite/perl-lib/lib/perl/5.8.4. Which is an annoying difference in thought between MakeMaker and perl. I know I've solved this before, but for some reason my employer's VPN server seems down, so I can't sneak in to take a peek. What I think it was, is that you just need to add "/lib" to your PERL5LIB:
export PERL5LIB=/home/mysite/perl-lib/lib
That said, I haven't tried this with CPAN - only when I have the tarballs already downloaded, and then I can make/make install quickly.

Replies are listed 'Best First'.
Re^2: Installing modules in personal lib directory - Just canīt make it work
by Andre_br (Pilgrim) on Nov 20, 2005 at 04:02 UTC
    Hey Tanktalus and Jesuashook,

    Thanks for the ideas, but it seems this isnīt supposed to end! Still doesnīt work. Same issue you have pointed, Tanktalus. The home/mysite/perl-lib/lib/perl/5.8.4 dir appears.

    I tryed to install at a /home/mysite/perllib2, to see it the "-" was the problem, like you pointed, J. But no changes.

    Iīm exausted, Itīs more than 2 am here, tomorrow I go on. If you can recall the workaround, please post here these days, ok, Tanktalus?

    Thanks a lot for the efforts

    Andre

      Ok, I finally got in - they had me locked out all day, and with work 3200km away, I couldn't just walk over and smack someone upside the head.

      I have an auto-install script which is not CPAN. I check our tarballs in to our version control system as-is, complete with licenses, etc., exactly as the module authors have given to CPAN. I just download and checkin. The auto-install script then does a few things:

      1. Sets PERL_MM_USE_DEFAULT to 1 and PERL5LIB to "$install_base/lib" - in your case, $install_base is /home/mysite/perl-lib, thus PERL5LIB will need to be /home/mysite/perl-lib/lib. (I actually use File::Spec so that this may actually work on Windows, but that's not relevant, so I'll skip any other such portability issues.)
      2. Untars all the tarballs.
      3. Finds any that don't have any unmet dependancies. Installs them.
        • Runs "$^X -I$install_base/lib Makefile.PL LIB=$install_base/lib PREFIX=$install_base". Looking at that now, I don't think the -I$install_base/lib part is required since it's already in PERL5LIB.
        • Runs "make install" (I don't bother with the tests - those are run manually by me before I check in)
        Repeat this step until all tarballs are installed (since now some of the dependancies that were unmet in the previous run may now be met).

      So it looks to me that I found some reason to set both PREFIX and LIB when creating the Makefile. So perhaps you should set both. Note that LIB is set to $PREFIX/lib, which makes things really straight-forward.

      Good luck!