You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Edward Prendergast <ed...@netring.co.uk> on 2009/12/03 10:51:42 UTC
SpamAssassin cpan install @INC lib issue on CentOS 5.4
Hi,
I'm getting errors when I trying to install Mail::SpamAssassin via cpan.
The crux of this seems to be:
Can't locate Digest/SHA1.pm in @INC (@INC contains: ../blib/lib
@@INSTALLSITELIB@@ /opt/perl5/lib/5.10.1/x86_64-linux
/opt/perl5/lib/5.10.1 /opt/perl5/lib/site_perl/5.10.1/x86_64-linux
/opt/perl5/lib/site_perl/5.10.1) at
../blib/lib/Mail/SpamAssassin/Bayes.pm line 61.
Whole output is available here: http://pastebin.com/m404a0ffc
This is already installed via CPAN and lives in
/opt/perl/lib/perl5/x86_64-linux/Digest/SHA1.pm
It is accessible via @INC in other scripts. For example if I run perl
-MDigest::SHA1 -e 'exit' I don't get any errors. @INC for a normal perl
script looks like this:
]# perl -e 'print join(", ", @INC)'
/opt/perl5/lib/perl5/x86_64-linux, /opt/perl5/lib/perl5,
/opt/perl5/lib/perl5/x86_64-linux, /opt/perl5/lib/5.10.1/x86_64-linux,
/opt/perl5/lib/5.10.1, /opt/perl5/lib/site_perl/5.10.1/x86_64-linux,
/opt/perl5/lib/site_perl/5.10.1, /opt/perl5/lib/5.10.1/x86_64-linux,
/opt/perl5/lib/5.10.1, /opt/perl5/lib/site_perl/5.10.1/x86_64-linux,
/opt/perl5/lib/site_perl/5.10.1, .
The reason perl lives in /opt is that this is a CentOS 5.4 and I'm
looking to bypass the perl that comes with RPM without overwriting or
deleting it so it's still around if something RPM-specific needs to use
it. The way I ensure that I'm using the right version of perl while I'm
trying to install Mail::SpamAssassin via the following environment
variables in /root/.bashrc:
export MODULEBUILDRC="/opt/perl5/.modulebuildrc"
export PERL_MM_OPT="INSTALL_BASE=/opt/perl5"
export
PERL5LIB="/opt/perl5/lib/perl5:/opt/perl5/lib/perl5/x86_64-linux:/opt/perl5/lib/5.10.1:/opt/perl5/lib/site_perl/5.10.1"
export PATH="/opt/perl5/bin:$PATH"
]# grep export ~/.bashrc
export MODULEBUILDRC="/opt/perl5/.modulebuildrc"
export PERL_MM_OPT="INSTALL_BASE=/opt/perl5"
export
PERL5LIB="/opt/perl5/lib/perl5:/opt/perl5/lib/perl5/x86_64-linux:/opt/perl5/lib/5.10.1:/opt/perl5/lib/site_perl/5.10.1"
export PATH="/opt/perl5/bin:$PATH"
]# perl -v
This is perl, v5.10.1 (*) built for x86_64-linux
I'm running all of this as root.
Any pointers in the right direction would be much appreciated.
Thanks,
Edward
************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any action taken or
omitted to be taken in reliance on it, any form of reproduction,
dissemination, copying, disclosure, modification, distribution and/or
publication of this E-mail message is strictly prohibited and may be
unlawful. If you have received this E-mail message in error, please notify
us immediately. Please also destroy and delete the message from your
computer.
************
Re: SpamAssassin cpan install @INC lib issue on CentOS 5.4
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> Kris Deugau wrote:
>> (Please keep the discussion on-list.)
On 04.12.09 09:31, Edward Prendergast wrote:
> Sorry about that - just hit 'reply' without checking where the message
> was actually going.
you seem to use ThunderBird - there is "reply-to-list" extension available
for thunderbird that should solve this kind of problems.
>> Yeah, that's the weird bit. You might try installing SA from the
>> tarball instead of CPAN - I had some odd errors come up when I tried
>> via CPAN, but I have a feeling some of that had to do with doing the
>> whole test as non-root.
>
> Still unsure where that @@INSTALLSITELIB@@ stuff was coming from but it
> certainly looks like the issue is now resolved. Many thanks for all your
> help.
afaik these kind of words appear in raw files before installing them on your
system. the @@INSTALLSITELIB@@ should be replaced by path on your system,
where you are going to install the package. It appears that you haven't
installed it using the correct way (read the docs)
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
We are but packets in the Internet of life (userfriendly.org)
Re: SpamAssassin cpan install @INC lib issue on CentOS 5.4
Posted by Edward Prendergast <ed...@netring.co.uk>.
Kris Deugau wrote:
> (Please keep the discussion on-list.)
Sorry about that - just hit 'reply' without checking where the message
was actually going.
>
> Edward Prendergast wrote:
>> Kris Deugau wrote:
>>> Edward Prendergast wrote:
>>>> @@INSTALLSITELIB@@ /opt/perl5/lib/5.10.1/x86_64-linux
>>> ^^^^^^^^^^^^^^^^^^
>>> This looks a little fishy...
>>
>> I agree, I'm not sure where it's coming from.
>
> FWIW, nothing like that showed up in my brief test - missing
> substitutions like that are usually a sign of a build gone wrong from
> early on.
>
>> That's a good question, but my qualms are mainly down wanting to
>> perhaps use local::lib and have up to date CPAN modules as it seems
>> to take a long time for these to filter down via redhat.
>
> Mmm. I use the RPMForge repo for more up-to-date Perl modules, but
> I've yet to run into any problems using the nominally outdated ones
> filtering down from RedHat/CentOS. Net::DNS is the only module I can
> think of where there are/were known issues (at least with respect to
> SA's usage) in the stock version.
My motivations aren't purely SpamAssassin related - there are other
programs that want current Perl modules (MailScanner) and I wanted to
get SpamAssassin along side these.
>
>> This is based around what I've seen from local::lib:
>>
>> http://search.cpan.org/~apeiron/local-lib-1.004009/lib/local/lib.pm#SYNOPSIS
>>
>
> Ah, hm. I think you should be fine just setting your path to call
> your custom Perl ahead of the system Perl; that looks to be targetted
> at cherrypicking module updates alongside the packaged system Perl.
Right you are! When I change my .bashrc to this:
#export MODULEBUILDRC="/opt/perl5/.modulebuildrc"
#export PERL_MM_OPT="INSTALL_BASE=/opt/perl5"
#export
PERL5LIB="/opt/perl5/lib/perl5:/opt/perl5/lib/perl5/x86_64-linux:/opt/perl5/lib/5.10.1:/opt/perl5/lib/site_perl/5.10.1"
export PATH="/opt/perl5/bin:$PATH"
SpamAssassin now installs OK.
>
> > Essentially when I use perl from the command
>> line (and install other modules from CPAN) everything seems to be OK,
>> issues only appear to be arising with Mail::SpamAssassin.
>
> Yeah, that's the weird bit. You might try installing SA from the
> tarball instead of CPAN - I had some odd errors come up when I tried
> via CPAN, but I have a feeling some of that had to do with doing the
> whole test as non-root.
Still unsure where that @@INSTALLSITELIB@@ stuff was coming from but it
certainly looks like the issue is now resolved. Many thanks for all your
help.
-Edward
************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any action taken or
omitted to be taken in reliance on it, any form of reproduction,
dissemination, copying, disclosure, modification, distribution and/or
publication of this E-mail message is strictly prohibited and may be
unlawful. If you have received this E-mail message in error, please notify
us immediately. Please also destroy and delete the message from your
computer.
************
Re: SpamAssassin cpan install @INC lib issue on CentOS 5.4
Posted by Kris Deugau <kd...@vianet.ca>.
(Please keep the discussion on-list.)
Edward Prendergast wrote:
> Kris Deugau wrote:
>> Edward Prendergast wrote:
>>> @@INSTALLSITELIB@@ /opt/perl5/lib/5.10.1/x86_64-linux
>> ^^^^^^^^^^^^^^^^^^
>> This looks a little fishy...
>
> I agree, I'm not sure where it's coming from.
FWIW, nothing like that showed up in my brief test - missing
substitutions like that are usually a sign of a build gone wrong from
early on.
> That's a good question, but my qualms are mainly down wanting to perhaps
> use local::lib and have up to date CPAN modules as it seems to take a
> long time for these to filter down via redhat.
Mmm. I use the RPMForge repo for more up-to-date Perl modules, but I've
yet to run into any problems using the nominally outdated ones filtering
down from RedHat/CentOS. Net::DNS is the only module I can think of
where there are/were known issues (at least with respect to SA's usage)
in the stock version.
> This is based around what I've seen from local::lib:
>
> http://search.cpan.org/~apeiron/local-lib-1.004009/lib/local/lib.pm#SYNOPSIS
Ah, hm. I think you should be fine just setting your path to call your
custom Perl ahead of the system Perl; that looks to be targetted at
cherrypicking module updates alongside the packaged system Perl.
> Essentially when I use perl from the command
> line (and install other modules from CPAN) everything seems to be OK,
> issues only appear to be arising with Mail::SpamAssassin.
Yeah, that's the weird bit. You might try installing SA from the
tarball instead of CPAN - I had some odd errors come up when I tried via
CPAN, but I have a feeling some of that had to do with doing the whole
test as non-root.
-kgd
Re: SpamAssassin cpan install @INC lib issue on CentOS 5.4
Posted by Kris Deugau <kd...@vianet.ca>.
Edward Prendergast wrote:
> I'm getting errors when I trying to install Mail::SpamAssassin via cpan.
> The crux of this seems to be:
>
> Can't locate Digest/SHA1.pm in @INC (@INC contains: ../blib/lib
> @@INSTALLSITELIB@@ /opt/perl5/lib/5.10.1/x86_64-linux
^^^^^^^^^^^^^^^^^^
This looks a little fishy...
> The reason perl lives in /opt is that this is a CentOS 5.4 and I'm
> looking to bypass the perl that comes with RPM without overwriting or
> deleting it so it's still around if something RPM-specific needs to use
> it.
Not that this really answers your question, but I'm curious why you felt
the need to install your own Perl. I've only come across one program
that had any recommendation to avoid most distros' bundled Perl
(ecommerce package Interchange) and with Perl 5.8/5.10 that's largely
for performance reasons, IIRC relating to Perl threading.
> The way I ensure that I'm using the right version of perl while I'm
> trying to install Mail::SpamAssassin via the following environment
> variables in /root/.bashrc:
.... O_o This seems overly complex (and possibly fragile) to me; from
the systems I've used an alternate Perl for something all of the heavy
magic like this is set up when you build Perl itself; any further magic
is handled internally by simply calling the right Perl binary.
Since I don't recall any specifics, I'm trying it out to see how things
work; the system I'm trying this on is i686 but otherwise an up-to-date
CentOS 5(.4).
-kgd