in reply to Perlfect search can't locate installed module DB_File.pm.

Try adding the respective directory to the shared library search paths (which is independent of @INC), i.e.

$ LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.7/lib ./test.pl

If that works, you could either write a little wrapper to set LD_LIBRARY_PATH appropriately, or create a symlink to libdb-4.7.so from within a directory which already is on the list of lib directories searched by default (usually /usr/lib (or /usr/lib64), /usr/local/lib, etc. — in case of doubt, use strace -f -efile ./test.pl to find out which directories are being tried...)

(See the man page ld.so(8) for details on configuring the dynamic linker/loader)

Replies are listed 'Best First'.
Re^2: Perlfect search can't locate installed module DB_File.pm.
by dbmathis (Scribe) on Jun 26, 2008 at 17:32 UTC

    Thanks almut, that fixed the test senario but the perl module require in the indexer.pl still fails to find the module. Any ideas?

    After all this is over, all that will really have mattered is how we treated each other.

      Either use string eval

      if( eval "require $isa" ) {

      or block eval (adding ".pm")

      eval { require "$isa.pm" } unless ($@) { ... }

      (Update: fixed my reply several times... now it should finally be ok :)

        Have the same problem, don't understand your solution. this goes where? in perl script trying to load DB_file? what is $isa set to, DB_File? thanks