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

Hi I am new to perl , my script is using BERKLEYDB module .I am running script on a cluster where perl 5.8.8 is installed but I have set PERL5LIB to my folder which contains perl 5.8.5. when I run script it give me this error: Can't load '/home/garimag/perl/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/BerkeleyDB/BerkeleyDB.so' for module BerkeleyDB: libdb-4.2.so: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/XSLoader.pm line 70. at /home/garimag/src/clairlib/lib/Clair/Network.pm line 965 Compilation failed in require at /home/garimag/src/clairlib/lib/Clair/Network.pm line 965. BEGIN failed--compilation aborted at /home/garimag/src/clairlib/lib/Clair/Network.pm line 965. Compilation failed in require at /home/garimag/src/clairlib/lib/Clair/Cluster.pm line 6. BEGIN failed--compilation aborted at /home/garimag/src/clairlib/lib/Clair/Cluster.pm line 6. Compilation failed in require at /home/garimag/src/clairlib/util/print_network_stats.pl line 11. BEGIN failed--compilation aborted at /home/garimag/src/clairlib/util/print_network_stats.pl line 11. Undefined subroutine &BerkeleyDB::Term::close_everything called at /home/garimag/perl/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/BerkeleyDB.pm line 1764. END failed--call queue aborted at /home/garimag/src/clairlib/util/print_network_stats.pl line 11. I have tried so many options like: I have put Berkleydb which uses LIB4.3.so , but then it give me some ELF error which is hard to grasp I have also downloaded perl 5.8.8 folder and used Berkleydb but error remains same. Please guide me how to go about this error.

Replies are listed 'Best First'.
Re: BerkleyDB in perl 5.8.8
by bichonfrise74 (Vicar) on Aug 28, 2009 at 03:43 UTC
    So, did you install BerkleyDB module in your directory where perl 5.8.5 resides?
    What happens when you do this?
    perl -MBerkeleyDB -e 1
      Its giving me this error: Can't load '/home/garimag/perl/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/BerkeleyDB/BerkeleyDB.so' for module BerkeleyDB: libdb-4.2.so: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/XSLoader.pm line 70. at -e line 0 Compilation failed in require. BEGIN failed--compilation aborted. Undefined subroutine &BerkeleyDB::Term::close_everything called at /home/garimag/perl/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/BerkeleyDB.pm line 1764. END failed--call queue aborted. It resides in my home directory, I use the following export command: export PERL5LIB=/home/garimag/src:/home/garimag/perl/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto:/home/garimag/perl/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi:/home/garimag/perl/lib/perl5/site_perl/5.8.5:/home/garimag/perl/lib64:/home/garimag/perl/lib:/home/garimag/src/clairlib/lib
Re: BerkleyDB in perl 5.8.8
by bichonfrise74 (Vicar) on Aug 28, 2009 at 16:52 UTC
    Oh, can you find this file anywhere in your system -- libdb-4.2.so ?