OpenSUSE 11.1: Devmon: Perl-Compile-Error for BER.pm
Hi all,
This question is neither xymon nor devmon specific, I think, so I ask here, because I'm subscribed to this list ...
Starting devmon complains about a missing BER.pm:
"./devmon
Can't locate BER.pm in @INC ( @INC contains: /home/xymon/devmon-0.3.1-beta1/modules /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at /home/xymon/devmon-0.3.1-beta1/modules/dm_snmp.pm line 24.
BEGIN failed--compilation aborted at /home/xymon/devmon-0.3.1-beta1/modules/dm_snmp.pm line 24. Compilation failed in require at ./devmon line 25. BEGIN failed--compilation aborted at ./devmon line 25."
but according to the following find it is there:
"find /usr -name BER.pm -print /usr/lib/perl5/vendor_perl/5.10.0/Convert/BER.pm"
Do I have to include the complete Path to BER.pm in @INC?
Yours hjb
Well, *you* know where it is, but Perl doesn't:
Your find locates it here:
/usr/lib/perl5/vendor_perl/5.10.0/Convert/BER.pm
but Perl looked for it here:
/home/xymon/devmon-0.3.1-beta1/modules /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl
That "Convert" directory is not being looked into for Perl modules. Unfortunately, it never will look anywhere other than what was compiled into it at install time. Were you the programmer, you could make perl see the module a number of ways.
You could add path to the module at the top of your script:
use lib /usr/lib/perl5/vendor_perl/5.10.0/Convert;
You could export a variable at your environment level:
export PERL5LIB=$PERL5LIB:/usr/lib/perl5/vendor_perl/5.10.0/Convert
There are a couple other ways covered by perldoc that I won't get into here because they don't apply.
This entire issue begs a larger question, though... Why isn't this module installed into the typical perl search path location? Having not used devmon myself, I am not aware of the issues surrounding it's installation, but I'd bet a couple of things. Either A) Devmon didn't install properly B) there was an additional step you missed in the documentation suggesting how to make it available C) you installed it into a location for yourself.
I do notice in your search path that perl is looking for devmon perl modules in:
/home/xymon/devmon-0.3.1-beta1/modules
Shouldn't the module be there by default? Did you take extra steps to move it into /usr/lib/perl5/vendor_perl/5.10.0/Convert ?
Something "not-standard" has gone on here, and I can't put my finger on it. Could you help me out a bit?
Thanks! Jerald
On Nov 20, 2009, at 5:47 AM, Hermann-Josef Beckers wrote:
Hi all,
This question is neither xymon nor devmon specific, I think, so I ask here, because I'm subscribed to this list ...
Starting devmon complains about a missing BER.pm:
"./devmon
Can't locate BER.pm in @INC ( @INC contains: /home/xymon/devmon-0.3.1-beta1/modules /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at /home/xymon/devmon-0.3.1-beta1/modules/dm_snmp.pm line 24.
BEGIN failed--compilation aborted at /home/xymon/devmon-0.3.1-beta1/modules/dm_snmp.pm line 24. Compilation failed in require at ./devmon line 25. BEGIN failed--compilation aborted at ./devmon line 25."
but according to the following find it is there:
"find /usr -name BER.pm -print /usr/lib/perl5/vendor_perl/5.10.0/Convert/BER.pm"
Do I have to include the complete Path to BER.pm in @INC?
Yours hjb
Jerald Sheets <questy at gmail.com> schrieb am 20.11.2009 13:53:26:
HI Jerald (and Gé) ...>
Well, *you* know where it is, but Perl doesn't:
Your find locates it here:
/usr/lib/perl5/vendor_perl/5.10.0/Convert/BER.pm
but Perl looked for it here:
/home/xymon/devmon-0.3.1-beta1/modules /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux- thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl
That "Convert" directory is not being looked into for Perl modules. Unfortunately, it never will look anywhere other than what was compiled into it at install time. Were you the programmer, you could make perl see the module a number of ways.
You could add path to the module at the top of your script:
use lib /usr/lib/perl5/vendor_perl/5.10.0/Convert;
You could export a variable at your environment level:
export PERL5LIB=$PERL5LIB:/usr/lib/perl5/vendor_perl/5.10.0/Convert
This var is not set in my installation. Setting it and/or copying the modules from /usr/... to ~/devmon.../modules finds the Convert-module, but devmon complains next about not finding the SNMP module, which, according to a cpan "install SNMP" is uptodate.
But following your further suggestions and RTFMing again, seems SNMP does not include SNMP::SESSION, which devmon requires. Getting and compiling it from the website mentioned in devmon's INSTALLATION text, devmon works now.
Sorry for the noise and thanks for your reply, which brought me on the right track.
Yours hjb
participants (2)
-
hj.beckers@kreis-steinfurt.de
-
questy@gmail.com