Nagios monitoring solves Perl script problems

Source: Internet
Author: User
Tags install perl perl script

[Root @ test download] #./check_memory.pl

Can't locate Nagios/Plugin. 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_memory.pl line 26.

BEGIN failed -- compilation aborted at./check_memory.pl line 26.

Solution:

[Root @ test download] # perl-MCPAN-e 'Install Nagios: plugin'

[Root @ test download] #./check_memory.pl

CHECK_MEMORY OK-1589 M free | free = 1666281472b ;;

[Root @ test download] #

Or

Cpan-I Nagios: Plugin


If an error is reported during the first installation:

Do you want to modify/update your configuration (y | n )? [No] no

The following message indicates whether to update or modify the original network configuration.


Shall I follow them and prepend them to the queue of modules we are processing right now? [Yes] yes

Are we prompted to follow them and their pre-queue modules that we are currently processing? Enter yes directly.


Well, the following is a wait. There may be several repeated prompts above. install them. After installation

Cpan>

Enter exit to exit.

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

[Root @ web-server1 download] # perl-MCPAN-e 'Install Nagios: plugin'

Can't locate CPAN. 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 .).

BEGIN failed -- compilation aborted.

Solution:

Wget http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-1.9800.tar.gz

Decompress the package and run the following command:

Perl Makefile. PL & make install

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

Can't locate ExtUtils/MakeMaker. pm in @ INC (@ INC contains

Solution:

Wget http://search.cpan.org/CPAN/authors/id/M//MSCHWERN/MS

Decompress the package and run the following command:

Perl Makefile. PL & make install


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

Can't locate Time/HiRes. 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/gitecroot/download/CPAN-1.9800) at/usr/share/perl5/Net/Ping. pm line 313.

Solution:

Yum install perl-Time-HiRes

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

Make is installed, but an error is reported during compilation:

Make: *** No rule to make target '/usr/lib/perl5/CORE/config. H', needed by 'makefile'. Stop.

Solution:

Yum install-y perl-devel

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

Can't locate local/lib. pm in @ INC


Run the command cpan-I Nagios: Plugin.

Perl-MCPAN-e 'Install Nagios: plugin'


If the installation is not successful, the following error is displayed: Can't locate Params/Validate. pm in @ INC.

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

Can't locate Params/Validate. pm in @ INC


Yum install perl-Params-Validate

Yum install perl-DateTime


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

Can't locate Regexp/Common. pm in @ INC

Cpan-I Regexp: Common


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.