Page 1 of 1

Can't locate Filesys/SmbClient.pm in @INC

Posted: Tue Jul 04, 2017 1:18 am
by gopinathnagios
Can't locate Filesys/SmbClient.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./check_smb_share_status.pl line 10.

can anyone help on the error above, i'm trying to run check_smb_share_status.pl checks on nagios and i can't seem to make it work, i've try to search over the net, still no luck finding any solutions :? . Thanks in advance

Re: Can't locate Filesys/SmbClient.pm in @INC

Posted: Wed Jul 05, 2017 11:54 am
by scottwilkerson
Looks like you are missing a perl package this plugin requires

Code: Select all

perl -MCPAN -e 'install Filesys::SmbClient'

Re: Can't locate Filesys/SmbClient.pm in @INC

Posted: Wed Jul 05, 2017 12:44 pm
by SteveBeauchemin
Red Hat 7 - not gonna find that module. I did not find satisfaction in my searches and had to move to a new plugin.

I suggest using the Nagios Exchange and finding a different plugin to run. One that uses smbclient versus a perl module.

Happy hunting.

Steve B

Re: Can't locate Filesys/SmbClient.pm in @INC

Posted: Wed Jul 05, 2017 4:54 pm
by tgriep
Thanks @SteveBeauchemin about the Redhat 7 tip.
@gopinathnagios if you have any questions, post them here.

Re: Can't locate Filesys/SmbClient.pm in @INC

Posted: Thu Jul 06, 2017 1:34 am
by gopinathnagios
Hi @tgriep Thanks for update.

While running below command , which option will i choose ?
OS : CentOS Linux release 7.3.1611 (Core)

" perl -MCPAN -e 'install Filesys::SmbClient' "

=====================================================================
Fetching with LWP:
http://cpan.mirror.choon.net/modules/03modlist.data.gz
Reading '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Writing /root/.cpan/Metadata
Running install for module 'Filesys::SmbClient'
Running make for A/AL/ALIAN/Filesys-SmbClient-3.2.tar.gz
Checksum for /root/.cpan/sources/authors/id/A/AL/ALIAN/Filesys-SmbClient-3.2.tar.gz ok

CPAN.pm: Building A/AL/ALIAN/Filesys-SmbClient-3.2.tar.gz

I search in: /usr/local/s/include
/s/include
/include
/usr/s/include
/root/include
/usr/local/samba/include
/usr/local/include
/usr/include
/usr/local/samba3/include
Where can I find libsmbclient.h ? [] -------------------------------------------> Which option will i choose ?

======================================================================================

Re: Can't locate Filesys/SmbClient.pm in @INC

Posted: Thu Jul 06, 2017 1:53 pm
by tgriep
It looks like that plugin requires more software that needs to be installed on the server.

Install this package on the server
libsmbclient-devel-4.1.1-31.el7 : Developer tools for the SMB client library

Then after installing that package, try reinstalling the perl module and use the following for where the libsmbclient.h is located at.

Code: Select all

/usr/include/samba-4.0/libsmbclient.h
You may want to look at other plugins that might install easier on the system.
https://exchange.nagios.org/index.php?o ... chword=smb