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

I am trying to install some perl libs on a server where I do not have root. So I am trying to install the libs in a directory. I am using the LIB and PREFIX option and it works well. But when I try to install a lib that needs one of the libs that I have already installed, it cannot find it. Any ideas? In this example I am trying to install some of the test modules as a prereq for another module. Test-Harness installs fine but Test-Simple which needs Test-Harness fails cause it cannot find the lib.
oracle@rtpsduxrman001 usprd316 > perl Makefile.PL LIB=/oracle/dba/dba_ +ora/perl/lib PREFIX=/oracle/dba/dba_ora/perl/lib Checking if your kit is complete... Looks good Writing Makefile for Test::Harness /oracle/dba/dba_ora/perl/src/Test-Harness-2.56 oracle@rtpsduxrman001 usprd316 > make cp lib/Test/Harness.pm blib/lib/Test/Harness.pm cp lib/Test/Harness/Assert.pm blib/lib/Test/Harness/Assert.pm cp lib/Test/Harness/Iterator.pm blib/lib/Test/Harness/Iterator.pm cp lib/Test/Harness/Point.pm blib/lib/Test/Harness/Point.pm cp lib/Test/Harness/Straps.pm blib/lib/Test/Harness/Straps.pm cp lib/Test/Harness/TAP.pod blib/lib/Test/Harness/TAP.pod cp bin/prove blib/script/prove /bin/perl -I/usr/perl5/5.6.1/lib/sun4-solaris-64int -I/usr/perl5/5.6.1 +/lib -MExtUtils::MakeMaker -e "MY->fixin(shift)" blib/script/prove Manifying blib/man1/prove.1 Manifying blib/man3/Test::Harness.3 Manifying blib/man3/Test::Harness::Assert.3 Manifying blib/man3/Test::Harness::Iterator.3 Manifying blib/man3/Test::Harness::Point.3 Manifying blib/man3/Test::Harness::Straps.3 Manifying blib/man3/Test::Harness::TAP.3 /oracle/dba/dba_ora/perl/src/Test-Harness-2.56 oracle@rtpsduxrman001 usprd316 > make test PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib -I/usr/perl5/5.6.1/ +lib/sun4-solaris-64int -I/usr/perl5/5.6.1/lib -e 'use Test::Harness q +w(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/00compile.........# Testing Test::Harness 2.56 under Perl 5.006001 a +nd Test::More 0.42 t/00compile.........ok t/assert............ok t/base..............ok t/callback..........ok t/from_line.........ok t/harness...........ok t/inc_taint.........ok t/nonumbers.........ok t/ok................ok t/pod...............skipped all skipped: Test::Pod 1.00 required for testing POD t/point-parse.......ok t/point.............ok t/prove-globbing....ok t/prove-switches....ok t/strap-analyze.....ok t/strap.............ok t/test-harness......ok 37/189 skipped: various reasons t/version...........ok All tests successful, 1 test and 37 subtests skipped. Files=18, Tests=534, 15 wallclock secs ( 7.59 cusr + 3.80 csys = 11.3 +9 CPU) /oracle/dba/dba_ora/perl/src/Test-Harness-2.56 oracle@rtpsduxrman001 usprd316 > make install Installing /oracle/dba/dba_ora/perl/lib/man/man1/prove.1 Installing /oracle/dba/dba_ora/perl/lib/man/man3/Test::Harness.3 Installing /oracle/dba/dba_ora/perl/lib/man/man3/Test::Harness::Assert +.3 Installing /oracle/dba/dba_ora/perl/lib/man/man3/Test::Harness::Iterat +or.3 Installing /oracle/dba/dba_ora/perl/lib/man/man3/Test::Harness::Point. +3 Installing /oracle/dba/dba_ora/perl/lib/man/man3/Test::Harness::Straps +.3 Installing /oracle/dba/dba_ora/perl/lib/man/man3/Test::Harness::TAP.3 Writing /oracle/dba/dba_ora/perl/lib/sun4-solaris-64int/auto/Test/Harn +ess/.packlist Appending installation info to /oracle/dba/dba_ora/perl/lib/sun4-solar +is-64int/perllocal.pod /oracle/dba/dba_ora/perl/src/Test-Harness-2.56 oracle@rtpsduxrman001 usprd316 > cd Test-Simple-0.62 oracle@rtpsduxrman001 usprd316 > perl Makefile.PL LIB=/oracle/dba/dba_ +ora/perl/lib PREFIX=/oracle/dba/dba_ora/perl/lib Checking if your kit is complete... Looks good Warning: prerequisite Test::Harness 2.03 not found at /usr/perl5/5.6.1 +/lib/ExtUtils/MakeMaker.pm line 343. 'LICENSE' is not a known MakeMaker parameter name. Writing Makefile for Test::Simple /oracle/dba/dba_ora/perl/src/Test-Simple-0.62 oracle@rtpsduxrman001 usprd316 >

holli added readmore tags as per personal judgement

2006-01-11 Retitled by holli, as per Monastery guidelines
Original title: 'Installing Perl Libs.'

Replies are listed 'Best First'.
Re: Installing Perl modules in my own directories
by Fletch (Bishop) on Jan 11, 2006 at 15:28 UTC

    You need to let Perl know where to find your installed-in-a-funky-location modules; see perldoc perlrun for the -L flag and the PERL5LIB environment variable.

Re: Installing Perl modules in my own directories
by borisz (Canon) on Jan 11, 2006 at 16:06 UTC
    You could use perl -I/oracle/dba/dba_ora/perl/lib myscript.pl or use the environment var PERL5LIB
    Boris
      Thanks. PERL5LIB worked perfectly. Mike