博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

行在北京

http://www.zhaojiantao.cn
  deargentle.cublog.cn

关于作者
http://www.zhaojiantao.cn
mail:cnsecurity#gmail.com

心所向往的地方,会有千万条路通向那里;一旦心志不坚定,就会找到万千条推脱的理由。
天下事,无患难行,患无行之人。
|| << >> ||
我的分类


The scripts outputs "Can't locate Net/SNMP.pm in @
Q:
 
Can't locate Net/SNMP.pm in @INC....."

[root@nagios libexec]# . /check_snmp_int.pl  -H 192.168.0.1 -C public -n eth
Can't locate Net/SNMP.pm in @INC (@INC contains: /usr b/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr b/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr b/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr b/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr b/perl5/site_perl/5.8.8 /usr b/perl5/site_perl/5.8.7 /usr b/perl5/site_perl/5.8.6 /usr b/perl5/site_perl/5.8.5 /usr b/perl5/site_perl /usr b/perl5 endor_perl/5.8.8/i386-linux-thread-multi /usr b/perl5 endor_perl/5.8.7/i386-linux-thread-multi /usr b/perl5 endor_perl/5.8.6/i386-linux-thread-multi /usr b/perl5 endor_perl/5.8.5/i386-linux-thread-multi /usr b/perl5 endor_perl/5.8.8 /usr b/perl5 endor_perl/5.8.7 /usr b/perl5 endor_perl/5.8.6 /usr b/perl5 endor_perl/5.8.5 /usr b/perl5 endor_perl /usr b/perl5/5.8.8/i386-linux-thread-multi /usr b/perl5/5.8.8 .) at . eck_snmp_int.pl line 16.
BEGIN failed--compilation aborted at . eck_snmp_int.pl line 16.
[root@nagios libexec]#
 
 
 
 
A:
The scripts outputs "Can't locate Net/SNMP.pm in @INC....."

You don't have Net::SNMP installed, see below

How do I install Net::SNMP perl module ?

There are 2 ways of doing this

1) By CPAN (best)

on command line, as root :

[your_host]# perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.76)
ReadLine support enabled
cpan> install Net::SNMP


If it's the first time you run CPAN, it will probably ask you some (simple) questions.

CPAN will also ask you to satisfy some dependencies (Crypt::DES, Digest::MD5, etc..).

2) "By hand"


Get the folowings modules (tar.gz format) on www.cpan.org

- Crypt::DES
- Digest::MD5
- Digest::SHA1
- Digest::HMAC
- Net::SNMP

for each one (you must install Net::SNMP at the end) :
tar zxf <module>.tar.gz
cd <module>
perl Makefile.pl
make test
make install
 
 

发表于: 2008-05-22,修改于: 2008-05-22 11:00,已浏览238次,有评论0条 推荐 投诉


网友评论
 发表评论