Page 1 of 1

Perl error

Posted: Mon Sep 30, 2013 4:38 am
by MPIvan
I was trying to use the check_ifoperstatus, but have the folowing error
root@mpnagios:/usr/local/nagios/libexec# ./check_ifoperstatus -h
Can't locate Net/SNMP.pm in @INC (@INC contains: /usr/local/nagios/libexec /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at ./check_ifoperstatus line 40.
BEGIN failed--compilation aborted at ./check_ifoperstatus line 40.
root@mpnagios:/usr/local/nagios/libexec#
And that line is use Net::SNMP;

Im trying to install Net::SNMP on Ubuntu Server 12.04 with the following command:

Code: Select all

perl -MCPAN -e 'install Net::SNMP'
Also i was trying this

"cpan> install Net::SNMP" and "install Bundle::CPAN"
And have the following errors:
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
DONE
Fetching with HTTP::Tiny:
http://artfiles.org/cpan.org/modules/02 ... ils.txt.gz
Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz'
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Line-Count header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Last-Updated header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Could not split line["<html>"]
Could not split line["\cI<head>"]
.Could not split line["\cI\cI"]
Could not split line[""]
Giving up parsing your /root/.cpan/sources/modules/02packages.details.txt.gz, too many errors
root@start:/usr/local/nagios/libexec# aptitude -y install snmp
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

Re: Perl error

Posted: Mon Sep 30, 2013 9:41 am
by abrist
Did you try installing net-snmp through apt?

Code: Select all

apt-get install net-snmp

Re: Perl error

Posted: Tue Oct 01, 2013 12:49 am
by MPIvan
Nop that not helping too. But after searching through the net i found the solution that works for me, i suppose that this problem is on the New Ubuntu Server 12.04.3 version LTS with the perl default installation. Im not sure about that but thats how i think it is. And here it is the solution ...

1.) mv /root/.cpan /root/.cpanbackup
2.) perl -MCPAN -e shell
3.) cpan > install Bundle::CPAN

and that it is all i hope we can close and sorry that i open this error post but i really need fast help

Re: Perl error

Posted: Tue Oct 01, 2013 10:37 am
by tmcdonald
Ahhh perl modules. The bane of setups everywhere :D

And as for opening threads, no need to apologize. That's what we're here for. I will however be closing this thread since the issue has been resolved.