[root@test download]# ./check_memory.pl
涪城網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)建站!從網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、響應(yīng)式網(wǎng)站設(shè)計(jì)等網(wǎng)站項(xiàng)目制作,到程序開發(fā),運(yùn)營維護(hù)。創(chuàng)新互聯(lián)建站自2013年創(chuàng)立以來到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)建站。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
第一次安裝如果中間有報(bào):
Do you want to modify/update your configuration (y|n) ? [no] no
這里提示要不要對原有網(wǎng)絡(luò)配置進(jìn)行更新修改,我們選擇no
Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] yes
這里提示須跟隨他們和他們預(yù)隊(duì)列中我們現(xiàn)在正在處理的模塊嗎,直接輸入yes.
好了,下面就是等待了,可能會有上面幾次的重復(fù)提示,都安裝上吧,安裝完后,出現(xiàn)
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
解壓后執(zhí)行:
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
解壓后執(zhí)行:
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裝好了卻編譯時(shí)報(bào)錯:
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
執(zhí)行命令:cpan -i Nagios::Plugin
perl -MCPAN -e 'install Nagios::Plugin'
如果沒有安裝成功,查看屏幕報(bào)錯: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是以數(shù)據(jù)為中央的標(biāo)記語言,其使用ASCII碼(如連字符、問號、冒號、逗號等)構(gòu)造數(shù)據(jù)塊(標(biāo)量值或哈希碼)。和XML相同,YAML也是一種機(jī)器可識別語言,并能和多種腳本語言相結(jié)合,其中一種便是Perl,需要安裝YAML,如下執(zhí)行:
cpan[2]>install YAML
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
網(wǎng)站名稱:nagios監(jiān)控解決Perl腳本問題-創(chuàng)新互聯(lián)
文章網(wǎng)址:http://jinyejixie.com/article44/decihe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航、外貿(mào)網(wǎng)站建設(shè)、外貿(mào)建站、域名注冊、網(wǎng)站設(shè)計(jì)、建站公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容