For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > December 2004 > 2 versions of a module installed?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 2 versions of a module installed?
Kevin Buzzard

2004-12-29, 3:56 pm


Hi. I think I have currently got two versions of Net::DNS installed on
my system. Perl has always run fine on my system and I've never needed
to delve into its inner workings but I appear now to have some problems
(specifically, I have just upgraded spamassassin to 3.0.2 and am now
getting some unexpected error messages). Using linux, debian unstable.

Here's why I think something is wrong.

***

root@crackpot:~# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support available (try 'install Bundle::CPAN')

cpan> i Net::DNS
Strange distribution name [Net::DNS]
Module id = Net::DNS
DESCRIPTION Interface to the DNS resolver
CPAN_USERID CREIN (Chris Reinhardt <cpan@triv.org> )
CPAN_VERSION 0.48
CPAN_FILE C/CR/CREIN/Net-DNS-0.48.tar.gz
DSLI_STATUS RmhO (released,mailing-list,hybrid,object-oriented)
MANPAGE Net::DNS - Perl interface to the DNS resolver
INST_FILE /usr/local/lib/perl/5.8.4/Net/DNS.pm
INST_VERSION 0.48


cpan>

***

This seems (to me) to indicate that I have V0.48 of Net::DNS installed.
*But* running spamassassin V3.02 e.g. with

$ spamassassin -r < sample_spam.txt > spam.out

gives me errors of the form

Net::DNS version is 0.23, but need 0.34dnsavailable-1 at /usr/local/share/perl/5.8.4/Mail/SpamAssassin/Dns.pm line 1230.

I am a total novice now. Here are some things that might be helpful:

root@crackpot:~# locate Dns.pm
/root/.cpan/build/Mail-SpamAssassin-2.63/blib/lib/Mail/SpamAssassin/Dns.pm
/root/.cpan/build/Mail-SpamAssassin-2.63/lib/Mail/SpamAssassin/Dns.pm
/usr/local/Mail-SpamAssassin-2.63/lib/Mail/SpamAssassin/Dns.pm
/usr/local/Mail-SpamAssassin-3.0.2/blib/lib/Mail/SpamAssassin/Dns.pm
/usr/local/Mail-SpamAssassin-3.0.2/lib/Mail/SpamAssassin/Dns.pm
/usr/local/share/perl/5.8.3/Mail/SpamAssassin/Dns.pm
/usr/local/share/perl/5.8.4/Mail/SpamAssassin/Dns.pm
/usr/share/perl5/Mail/SpamAssassin/Dns.pm
root@crackpot:~#

(is that rather a lot of Dns.pm's?)

$ perl -V
[snip]
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Oct 25 2004 01:13:24
@INC:
/etc/perl
/usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
/usr/local/lib/perl/5.8.3
/usr/local/share/perl/5.8.3

Perl itself will have been installed via debian's apt-get. I installed
spamassassin via the tarball.

Any hints as to how to convince spamassassin (which was compiled and
installed after I installed Net::DNS 0.48) to use the right version?

Cheers,

Kevin
Gunnar Hjalmarsson

2004-12-29, 3:56 pm

Kevin Buzzard wrote:
> Hi. I think I have currently got two versions of Net::DNS installed on
> my system.


<snip>

> root@crackpot:~# locate Dns.pm


Hmm.. You'd better look for the location of DNS.pm or Net/DNS.pm (Linux
is case sensitive).

Also, what does

$ perl -e 'print "$_\n" for @INC'

result in?

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Kevin Buzzard

2004-12-29, 3:56 pm

In article <33g3fuF3vpj5tU1@individual.net>,
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
>
>Hmm.. You'd better look for the location of DNS.pm or Net/DNS.pm (Linux
>is case sensitive).


I knew that---but I knew sufficiently little about perl to know that
there was a DNS.pm as well as a Dns.pm :-) Thanks! In fact this is
enough of a hint! I have several DNS.pm's, I have just deleted the ones with
$VERSION = "0.23"; in and this has fixed the problem.

Cheers,

Kevin
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com