I’ve been seeing these errors in our Opsview 188.8.131.52061249 installation:
Can't locate File/Slurp.pm in @INC (@INC contains: /usr/local/nagios/bin/../lib /usr/local/nagios/bin/../etc /usr/local/nagios/bin/../perl/lib /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 /usr/local/nagios/bin/../lib/Opsview/Run.pm line 23.
These errors were generated by one particular crontab job:
I was able to install File::Slurp module through yum…
yum install -y perl-File-Slurp.noarch
Then, it’s asking for another module… “IPC::Run”
yum install -y perl-IPC-Run.noarch
Then, it’s asking for another module… “IPC::Run::SafeHandles”. But since there are no RPM packages for this, I am forced to do this the perl way… CPAN.
yum install -y perl-CPAN.x86_64
And then installed cpanm right after (as recommended here)
Retrying the installation of “IPC::Run::SafeHandles”
Then, I’m stuck… The module IPC::Run::SafeHandles won’t install because it requires “List::MoreUtils::XS”. Which I cannot install because of an error with this unhelpful message:
I did a few a google search about the module and I stumbled on this exciting discussion.
Hmmmm…. PUREPERL… maybe I need to invoke this via cpanm. Browsing through cpanm’s manual, it has a a –pp option for pure Perl.
cpanm --pp IPC::Run::SafeHandles
It installed without a hitch! 🙂
But as for the Opsview script, it still required 2 more modules:
yum install perl-Proc-Simple yum install perl-Log-Log4perl
Now I have to find out what caused these Perl modules to be gone missing in the first place…