亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

nagios監控解決Perl腳本問題

發布時間:2020-05-14 20:24:24 來源:網絡 閱讀:7301 作者:151wqooo 欄目:移動開發


[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.

解決:

[root@test download]# perl -MCPAN -e 'install Nagios::Plugin'

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

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

[root@test download]#

或者

cpan -i Nagios::Plugin


第一次安裝如果中間有報:

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

這里提示要不要對原有網絡配置進行更新修改,我們選擇no


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

這里提示須跟隨他們和他們預隊列中我們現在正在處理的模塊嗎,直接輸入yes.


好了,下面就是等待了,可能會有上面幾次的重復提示,都安裝上吧,安裝完后,出現

cpan>

輸入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.

解決:

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

解壓后執行:

perl Makefile.PL && make && make install

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

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

解決:

wget http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/ExtUtils-MakeMaker-6.54.tar.gz

解壓后執行:

perl Makefile.PL && make && 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.

解決:

yum install perl-Time-HiRes

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

make裝好了卻編譯時報錯:

make: *** No rule to make target `/usr/lib/perl5/CORE/config.h',needed by `Makefile'. Stop.

解決:

yum install -y perl-devel

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

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


執行命令:cpan -i Nagios::Plugin

perl -MCPAN -e 'install Nagios::Plugin'


如果沒有安裝成功,查看屏幕報錯: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

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

Can't locate Test/More.pm


cpan -i Test::More

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

XML-Parser模塊安裝

yum install gcc -y

yum install expat-devel  -y

wget http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/XML-Parser-2.34.tar.gz

tar zxf XML-Parser-2.34.tar.gz

cd XML-Parser-2.34

perl Makefile.PL  && make && make install

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

XML-Simple模塊安裝

perl -MCPAN -e "install XML::Simple"

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

yum install perl-CPAN

[root@wgq_line_cache_3_41 plugins]# ./check_redis.pl --help

Can't locate Redis.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_redis.pl line 421.

BEGIN failed--compilation aborted at ./check_redis.pl line 421.

[root@wgq_line_cache_3_41 plugins]#

 

[root@wgq_line_cache_3_41 plugins]# perl -MCPAN -e shell

Terminal does not support AddHistory.

 

cpan shell -- CPAN exploration and modules installation (v1.9402)

Enter 'h' for help.

 

cpan[1]> install Redis

Can't locate Module/Build/Tiny.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 Build.PL line 2.

BEGIN failed--compilation aborted at Build.PL line 2.

Warning: No success on command[/usr/bin/perl Build.PL --installdirs site]

Warning (usually harmless): 'YAML' not installed, will not store persistent state

  DAMS/Redis-1.976.tar.gz

  /usr/bin/perl Build.PL --installdirs site -- NOT OK

Running Build test

  Make had some problems, won't test

Running Build install

  Make had some problems, won't install

Could not read '/root/.cpan/build/Redis-1.976-Zhz6xI/META.yml'. Falling back to other methods to determine prerequisites……

 

YAML是以數據為中央的標記語言,其使用ASCII碼(如連字符、問號、冒號、逗號等)構造數據塊(標量值或哈希碼)。和XML相同,YAML也是一種機器可識別語言,并能和多種腳本語言相結合,其中一種便是Perl,需要安裝YAML,如下執行:

cpan[2]>install YAML


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

龙游县| 玉林市| 延吉市| 辽宁省| 远安县| 连城县| 高邮市| 乡宁县| 大港区| 呈贡县| 海阳市| 江安县| 商南县| 阿鲁科尔沁旗| 花莲市| 自贡市| 沿河| 上饶市| 苍山县| 登封市| 封开县| 全州县| 阳朔县| 阆中市| 郴州市| 鹤岗市| 手游| 富源县| 始兴县| 宿迁市| 宁夏| 高台县| 阳西县| 无锡市| 瓮安县| 福清市| 镇巴县| 建平县| 遵义市| 克拉玛依市| 贵阳市|