Can't locate Nagios/Plugin.pm in @INC

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Can't locate Nagios/Plugin.pm in @INC

Post by braindope »

Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./check_esx.pl line 32.
BEGIN failed--compilation aborted at ./check_esx.pl line 32.

can anyone help on the error above :( , im trying to un check_esx.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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't locate Nagios/Plugin.pm in @INC

Post by tmcdonald »

I see you're running this on Nagios Core, so let's try to install that plugin:

Code: Select all

perl -MCPAN -e 'install Nagios::Plugin'
You may have to hit enter a few times through the install process. If this does not work, show me the last few lines before it fails and we'll go from there.
Former Nagios employee
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Can't locate Nagios/Plugin.pm in @INC

Post by braindope »

Hi Sir, please see below error, hope you can help me, thanks

FAILED--81 test scripts could be run, alas--no output ever seen
make: *** [test_dynamic] Error 255
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
Running install for module Config::Tiny
Running make for R/RS/RSAVAGE/Config-Tiny-2.20.tgz
LWP not available

Trying with "/usr/bin/links -source" to get
http://www.cpan.org/authors/id/R/RS/RSA ... y-2.20.tgz

Trying with "/usr/bin/links -source" to get
http://www.cpan.org/authors/id/R/RS/RSAVAGE/CHECKSUMS

Checksum mismatch for distribution file. Please investigate.

Distribution id = R/RS/RSAVAGE/Config-Tiny-2.20.tgz
CPAN_USERID RSAVAGE (Ron Savage <ron@savage.net.au>)
CALLED_FOR Config::Tiny
CONTAINSMODS Config::Tiny
MD5_STATUS
incommandcolor 1
localfile /root/.cpan/sources/authors/id/R/RS/RSAVAGE/Config-Tiny-2.20.tgz

I'd recommend removing
/root/.cpan/sources/authors/id/R/RS/RSAVAGE/Config-Tiny-2.20.tgz. Its MD5
checksum is incorrect. Maybe you have configured your 'urllist' with
a bad URL. Please check this array with 'o conf urllist', and
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Can't locate Nagios/Plugin.pm in @INC

Post by eloyd »

You are way deep in the woods of Perl at this point. Try these steps, logged in as root:

Code: Select all

rm -Rf ~/.cpan
perl -MCPAN -e shell
reload index
exit
perl -MCPAN -e "upgrade /(.\*)/"
Depending on what specific version of Perl you have installed, that last line may not work. Let me know if it doesn't. If it does work, this will update all of your CPAN/Perl modules. It looks like you've got some things out of whack.

Then you can go back to what Trevor suggested.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't locate Nagios/Plugin.pm in @INC

Post by abrist »

You may also find this package in yum (epel) (or other package managers/repos):

Code: Select all

yum install perl-Nagios-Plugin
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Can't locate Nagios/Plugin.pm in @INC

Post by braindope »

eloyd wrote:You are way deep in the woods of Perl at this point. Try these steps, logged in as root:

Code: Select all

rm -Rf ~/.cpan
perl -MCPAN -e shell
reload index
exit
perl -MCPAN -e "upgrade /(.\*)/"
Depending on what specific version of Perl you have installed, that last line may not work. Let me know if it doesn't. If it does work, this will update all of your CPAN/Perl modules. It looks like you've got some things out of whack.

Then you can go back to what Trevor suggested.

Hi Sir, the last line didn't work for me, can you further guide in my problem?
"syntax error at -e line 1, near "(."
Execution of -e aborted due to compilation errors."

Thank you very much for helping,
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't locate Nagios/Plugin.pm in @INC

Post by abrist »

What linux distro are you running?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Can't locate Nagios/Plugin.pm in @INC

Post by braindope »

abrist wrote:What linux distro are you running?
Hi sir i'm running "CentOS release 5.6 (Final)"
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't locate Nagios/Plugin.pm in @INC

Post by abrist »

Did you try installing from through yum?

Code: Select all

yum install perl-Nagios-Plugin
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Can't locate Nagios/Plugin.pm in @INC

Post by braindope »

abrist wrote:Did you try installing from through yum?

Code: Select all

yum install perl-Nagios-Plugin

Hello, when I try "yum install perl-Nagios-Plugin" this error shows :(

http://dl.fedoraproject.org/pub/epel/6/ ... sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: failure: repodata/0d0cd801e6712f03b0fc7e9b83af923d4b609b69bd602d247d45a107d0da7722-primary.sqlite.bz2 from Perl: [Errno 256] No more mirrors to try.
Locked