[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] OpenSUSE 11.1: Devmon: Perl-Compile-Error for BER.pm



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