I
Ishmael
I am trying to get Perl to recognize a module (Math::GMP) that is
installed in a local directory, i.e. not the same directory as the rest
of Perl. I've been trying to use the PERL5LIB environment variable to
get Perl to search on the correct path, but it doesn't work. Here's
what I mean:
First I set (what I believe to be) the search path:
setenv PERL5LIB
/home/kstahl/PERL/Digest-1.15:/home/kstahl/PERL/Digest-SHA1-2.11:
/home/kstahl/PERL/Scalar-List-Utils-1.19:/home/kstahl/PERL/gmp-4.2.1:
/home/kstahl/PERL/Math-GMP-2.04:/home/kstahl/PERL/Math-GMP-2.04/lib:
/home/kstahl/PERL/Math-GMP-2.04/blib:
/home/kstahl/PERL/Math-GMP-2.04/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP:
/home/kstahl/PERL/Net-SSH-Perl-1.30
Now I check to see if it finds the module.
perl -MMath::GMP -e 'print "ok\n"'
Answer: Nope, it's still looking in the perl installation directory.
Can't load
'/apps/gnu/perl_local/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP/GMP.so'
for
module Math::GMP: ld.so.1: perl: fatal: libgmp.so.3: open failed: No
such file
or directory at /apps/gnu/perl-5.6.1/lib/sol2.sun4/DynaLoader.pm line
206.
at -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.
Check to make sure correct directory is on the path:
perl -e 'while(<@INC>) { print "$_\n"; }'
/home/kstahl/PERL/Digest-1.15
/home/kstahl/PERL/Digest-SHA1-2.11
/home/kstahl/PERL/Scalar-List-Utils-1.19
/home/kstahl/PERL/gmp-4.2.1
/home/kstahl/PERL/Math-GMP-2.04
/home/kstahl/PERL/Math-GMP-2.04/lib/sol2.sun4
/home/kstahl/PERL/Math-GMP-2.04/lib
/home/kstahl/PERL/Math-GMP-2.04/blib
/home/kstahl/PERL/Math-GMP-2.04/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP
/home/kstahl/PERL/Net-SSH-Perl-1.30
/apps/gnu/perl-5.6.1/lib/sol2.sun4
/apps/gnu/perl-5.6.1/lib
/apps/gnu/perl_local/lib/site_perl/5.6.1/sol2.sun4
/apps/gnu/perl_local/lib/site_perl/5.6.1
/apps/gnu/perl_local/lib/site_perl
..
Looks to me like the every conceivable subdirectory is included (as
well as the complete path to the actual library, GMP.so). What am I
missing here?
Thanks a priori!
installed in a local directory, i.e. not the same directory as the rest
of Perl. I've been trying to use the PERL5LIB environment variable to
get Perl to search on the correct path, but it doesn't work. Here's
what I mean:
First I set (what I believe to be) the search path:
setenv PERL5LIB
/home/kstahl/PERL/Digest-1.15:/home/kstahl/PERL/Digest-SHA1-2.11:
/home/kstahl/PERL/Scalar-List-Utils-1.19:/home/kstahl/PERL/gmp-4.2.1:
/home/kstahl/PERL/Math-GMP-2.04:/home/kstahl/PERL/Math-GMP-2.04/lib:
/home/kstahl/PERL/Math-GMP-2.04/blib:
/home/kstahl/PERL/Math-GMP-2.04/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP:
/home/kstahl/PERL/Net-SSH-Perl-1.30
Now I check to see if it finds the module.
perl -MMath::GMP -e 'print "ok\n"'
Answer: Nope, it's still looking in the perl installation directory.
Can't load
'/apps/gnu/perl_local/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP/GMP.so'
for
module Math::GMP: ld.so.1: perl: fatal: libgmp.so.3: open failed: No
such file
or directory at /apps/gnu/perl-5.6.1/lib/sol2.sun4/DynaLoader.pm line
206.
at -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.
Check to make sure correct directory is on the path:
perl -e 'while(<@INC>) { print "$_\n"; }'
/home/kstahl/PERL/Digest-1.15
/home/kstahl/PERL/Digest-SHA1-2.11
/home/kstahl/PERL/Scalar-List-Utils-1.19
/home/kstahl/PERL/gmp-4.2.1
/home/kstahl/PERL/Math-GMP-2.04
/home/kstahl/PERL/Math-GMP-2.04/lib/sol2.sun4
/home/kstahl/PERL/Math-GMP-2.04/lib
/home/kstahl/PERL/Math-GMP-2.04/blib
/home/kstahl/PERL/Math-GMP-2.04/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP
/home/kstahl/PERL/Net-SSH-Perl-1.30
/apps/gnu/perl-5.6.1/lib/sol2.sun4
/apps/gnu/perl-5.6.1/lib
/apps/gnu/perl_local/lib/site_perl/5.6.1/sol2.sun4
/apps/gnu/perl_local/lib/site_perl/5.6.1
/apps/gnu/perl_local/lib/site_perl
..
Looks to me like the every conceivable subdirectory is included (as
well as the complete path to the actual library, GMP.so). What am I
missing here?
Thanks a priori!