Posted on 2006-11-29 01:11:05-08 by timdaley
CPAN installation of SNMP::Util fails on RedHat ES5 Beta 2
CPAN installations don't directly allow for the change of the MIBDIRS environment variable specified in SNMP/Util-env.pm. Installations on RHES5 Beta 2 and probably most others do not have a default location of /usr/local/lib/share/snmp/mibs. This means that the default "make test" will fail looking for the MIBs.

If the following change is made to SNMP/Util-env.pm, most user modification will probably be unnecessary. Since net-snmp-config is a prereq to the SNMP package which is a prereq to SNMP::Util, everything should work.

Change:
$ENV{'MIBDIRS'} = '/usr/local/lib/share/snmp/mibs';
To:
$ENV{'MIBDIRS'} = `net-snmp-config --default-mibdirs`; chomp $ENV{'MIBDIRS'};
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.