Can't locate Net/SNMP.pm in @INC

If you get error "Can't locate Net/SNMP.pm in @INC" while executing a perl script, and in your script syntax is as below, where Net::SNMP module is in use.

use strict;
use Net::SNMP;
use Getopt::Long;

Then use the following step to install Net SNMP

Solution :-- Login as a Super user (root) user on machine. 

Login to CPAN shell with following command.

#perl -MCPAN -e shell

cpan> install Bundle::CPAN

cpan[1]> reload cpan 

cpan[1]> reload index

cpan[1]> install Net::SNMP 

cpan[1]> install Getopt::Long


cpan> exit
Terminal does not support GetHistory.
Lockfile removed.
#

After all this try to execute your script ..hopefully your problem will be resolved.

Comments

Popular posts from this blog

INSTALL CISCO VPN CLIENT ON WINDOWS 10 (32 & 64 BIT). FIX REASON 442

Linux File and Directory Permissions