in reply to Re: Installing local Perl module
in thread Installing local Perl module

Hi, It could be the priveleges... I get the error:
Can't locate Kepler.pm in @INC (@INC contains: /home/username/usr/loca +l/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.8.8/i386-linux +-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl + /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/pe +rl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8 +/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at test.pl line 6.
I know that it detects:
/home/username/usr/local/lib/perl5/site_perl/5.6.1
It detects the use of "use lib qw(/home/cosmos/usr/local/lib/perl5/site_perl/5.6.1);" would give an error otherwise, right? - and I've tryed separetly. But why not the module? It's not there? Regards, Kepler

Replies are listed 'Best First'.
Re^3: Installing local Perl module
by Anonymous Monk on Apr 24, 2011 at 15:26 UTC

    My problem is the same. I have put use lib in BEGIN block. I have checked that my locally installed modules are in the @INC, and everything is fine when I run the script from terminal - but not found when I access the script via browser. Permissions are rwx-rx-x, http server (lighty) runs as root.

    Only globally installed modules and those under ./ are loaded. Strange enough I received no error from CGI::Debug, only use warning pragma dropped the usual not in @INC message.

      My problem is the same. I have put use lib in BEGIN block. I have checked that my locally installed modules are in the @INC, and everything is fine when I run the script from terminal - but not found when I access the script via browser. Permissions are rwx-rx-x, http server (lighty) runs as root.

      Is the %ENV the same, are you using the same perl (path can change between users?

      Only globally installed modules and those under ./ are loaded. Strange enough I received no error from CGI::Debug, only use warning pragma dropped the usual not in @INC message.

      Don't describe errors/warnings but copy/paste them instead, thanks

        Error:

        Software error: Can't locate DBI.pm in @INC (@INC contains: /home/salmonix/memdrive/FA +CER/TEST/face-r/index.pl /home/salmonix/perl5/lib/perl5 /usr/lib64/pe +rl5/site_perl/5.12.2/x86_64-linux-thread-multi /usr/lib64/perl5/site_ +perl/5.12.2 /usr/lib64/perl5/vendor_perl/5.12.2/x86_64-linux-thread-m +ulti /usr/lib64/perl5/vendor_perl/5.12.2 /usr/lib64/perl5/5.12.2/x86_ +64-linux-thread-multi /usr/lib64/perl5/5.12.2 /usr/lib64/perl5/site_p +erl /usr/lib64/perl5/vendor_perl .) at /home/salmonix/memdrive/FACER/ +TEST/face-r/index.pl line 18. BEGIN failed--compilation aborted at /home/salmonix/memdrive/FACER/TES +T/face-r/index.pl line 18. For help, please send mail to this site's webmaster, giving this error + message and the time and date of the error.

        My BEGIN block:

        BEGIN { my $lib1=$ENV{SCRIPT_FILENAME} || $ENV{PWD}; ($lib1)=($lib1=~/(\/home\/\w+\/)/); $lib1.="perl5/lib/perl5"; unshift @INC,$lib1; # map { print " $_\n" } @INC; }