Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Net::SNMP

Posted on 2013-05-13
4
Medium Priority
?
332 Views
Last Modified: 2013-05-13
When I run my perl script, I get the following error.

Can't locate Net/SNMP.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at ./myscript.pl line 3.
BEGIN failed--compilation aborted at ./myscript.pl line 3.


Here is line 3 of my script:

#!/usr/bin/perl

use Net::SNMP qw(:snmp);    #  Line 3 of myscript.pl
use Net::Ping;

Open in new window



Seems like there is problem with finding the Net/SNMP.  Please advice what should I need to do.  Thanks!
0
Comment
Question by:natalie_n
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Expert Comment

by:FishMonger
ID: 39161548
Did you install the Net::SNMP module?  If so, it wasn't installed correctly.

You need to install the module.
0
 
LVL 23

Accepted Solution

by:
nemws1 earned 2000 total points
ID: 39161554
You need to install that module.

What OS are you running?  Do you have root access on your workstation?

The short answer, run:

sudo cpan Ne::SNMP

And when asked if to use default settings, just say "yes"
0
 

Author Comment

by:natalie_n
ID: 39162079
Thanks for your helps.  I run "sudo cpan Net::SNMP", and it works.
0
 
LVL 23

Expert Comment

by:nemws1
ID: 39162085
Glad to help. ;-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question