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

I am trying to use the smbclient module from CPAN. I installed it but when I execute a script the uses the module I get this error.
Can't load '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/Filesys/Smb +Client/SmbClient.so' for module Filesys::SmbClient: libsmbclient.so.0 +: cannot open shared object file: No such file or directory
I checked and '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/Filesys/SmbClient/SmbClient.so' does exist and permissions should allow access to it. Any help would be appreciated. Thanks. Joseph Wagner Network Manager

Replies are listed 'Best First'.
Re: smbclient.pm problems
by virtualsue (Vicar) on May 01, 2003 at 18:04 UTC
    Is $LD_LIBRARY_PATH set? The shared library loader is actually looking for libsmbclient.so.0, so you either don't have it, or the loader needs help finding it. For example, if libsmbclient.so.0 is in /usr/local/lib, try setting $LD_LIBRARY_PATH in your environment before running your script, e.g.:
    LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
Re: smbclient.pm problems
by Necos (Friar) on May 01, 2003 at 17:29 UTC
    My suggestion to you would be to check your @INC paths. Try this snippet:
    perl -e 'print $_,$/ for (@INC);'
    The output for me (on my Slackware 8.0 box with perl 5.6.1) is:
    tessai@clc-tessai(~))$ perl -e 'print $_,$/ for (@INC);' /usr/lib/perl5/i386-linux /usr/lib/perl5 /usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl /usr/lib/perl5/site_perl .
    I'm guessing that the smbclient module (which I didn't know about, but now I'm going to search for) is installing itself in the wrong place. It may be assuming a newer version of Perl, or a certain @INC structure. I believe you can change the install paths when you run 'perl Makefile.pl' or by editing the Makefile directly (probably way too messy).

    Update: Can you please post the relevant portion of the script you're running? Just the first few lines that contain the use statements. It may just be that you misspelled the name of the module (I've been bitten by that before).

    Theodore Charles III
    Network Administrator
    Los Angeles Senior High
    email->secon_kun@hotmail.com
    perl -e "map{print++$_}split//,Mdbnr;"