Mailscanner perl modules

Rick Cooper rcooper at DWFORD.COM
Wed Mar 10 14:37:42 GMT 2004


> -----Original Message-----
> From: MailScanner mailing list
> [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
> Behalf Of Chris Connell
> Sent: Wednesday, March 10, 2004 7:30 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Mailscanner perl modules
>
>
> Hi,
>
> I have had this problem since day one of installing
> Mailscanner solaris 9
> and it haunted me when I upgraded. For some reason
> when I built perl etc the
> modules go in the following place, (possibly due to
> that I used perl from
> the sunfreeware ?)
>
> usr/local/lib/perl5/site_perl/5.8.0
>
> However when Mailscanner starts it looks somewhere
> else so I get the
> following error when I start it
>
> Can't locate Net/CIDR.pm in @INC (@INC contains:
> /opt/MailScanner/lib
> /usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib
> /usr/perl5/site_perl/5.6.1/sun4-solaris-64int
> /usr/perl5/site_perl/5.6.1
> /usr/perl5/site_perl
> /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int
> /usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .
> /opt/MailScanner/lib)
> at /opt/MailScanner/lib/MailScanner/Config.pm line 34.
> BEGIN failed--compilation aborted at
> /opt/MailScanner/lib/MailScanner/Config.pm line 34.
> Compilation failed in require at
> /opt/MailScanner/bin/MailScanner line 41.
> BEGIN failed--compilation aborted at
> /opt/MailScanner/bin/MailScanner line
> 41.
>
> The fix is to add the statement
>
> use lib "/usr/local/lib/perl5/site_perl/5.8.0";
>
> in the Mailscanner script, but Im not sure if this is
> correct. Sometimes the
> perl modules go in
> /usr/local/lib/perl5/site_perl/5.8.0/sun4m-solaris (such
> as Compress) could someone tell me what Im doing
> wrong, and how to put them
> all in one (correct) place ?
>

First (in a console window)

did you possibly install perl upgrade from source rather than
through CPAN? It appears that you actualy have two perl installs
/usr/perl5 and /usr/local/lib/perl5 (which is probably the
correct one)

Run this command (pay attention to the uppercase V)
perl -V

and see where perl thinks it's stuff belongs, toward the bottom
of the output you should see something like:

Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Mar 16 2003 22:57:59
  @INC:
    /usr/lib/perl5/5.8.0/i686-linux
    /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i686-linux
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl/5.6.1
    /usr/lib/perl5/site_perl/5.6.0
    /usr/lib/perl5/site_perl

This is from my installation so the build, compile, platform, etc
reflect my own. Which ever path (/usr/perl5 or /usr/local/perl5)
you see that would be where perl expects to find it's items.

Then run

find /usr -type f -iname perl

and see if it finds two binaries (perhaps at /usr/bin and
/usr/local/bin) and check
the shebang (#!/path/to/perl )in
/opt/MailScanner/bin/MailScanner

and see where it is pointing

If you have to installs and two binaries one needs to go. The
updates should go under the base /usr/?local/perl5 not a separate
directory



More information about the MailScanner mailing list