[SGVLUG] Perl hiccup -- MD5 or not?

Tom Emerson osnut at pacbell.net
Sun Nov 6 10:01:15 PST 2005


On Sunday 06 November 2005 05:07, Jeff Carlson wrote:
> Tom Emerson wrote:
> > [...] the system claims Digest::MD5 is not installed, yet [...] cpan/shell
> > [shows] up to date [...]
>
> What does this command return?
>
> perl -MDigest::MD5 -e 1
>
> If there is output, then the module is not properly installed.  If it's
> silent, then it's installed.  If that's the case, is there any chance
> maybe you have upgraded Perl?

output: nothing [now]

Of course, I've been hammering on this since I wrote this, but what I show 
below was the case before I started.  I have not (knowingly) upgraded perl, 
and per an rpm -qa listing (and perl -v), the system thinks the version is 
5.8.1.  

> I'm thinking maybe you upgraded Perl, then Digest::MD5 was installed
> after the upgrade, and amavisd is using a copy of the pre-installed
> version.  Any chance I'm right?

I've had other oddities surrounding perl and MD5 [movable type suddenly 
stopped working, and their newsgroups were equally mystified; eventual 
solution was to upgrade to the more restrictive version -- kicking and 
screaming the whole way ;) ]  Searching google for "required basic modules 
missing" (the error seems to be amavisd specific (*)) returned a few bits of 
advice along the lines you've mentioned (different perl versions) however 
there is no followup as to whether the suggestions were successful.  Taking a 
hint from one of them, I checked as follows:

osnut:~ # which perl
/usr/bin/perl
osnut:~ # head `which amavisd`
#!/usr/bin/perl -T

#------------------------------------------------------------------------------

so version conflicts don't seem to be the problem.  While I was kicking around 
in the cpan "shell", I found the command "r" will report which modules are 
"out of date" (or, at least, for which a newer version exists)  Related to 
this whole mess was spamassassin itself -- it seems I was on 3.0.1, and 
version 3.1.0 was now available.  I went ahead and upgraded that "in the mean 
time", and as it took a while to compile (and test), I went to bed.  Today, 
amavisd starts without complaint, so I suspect a side-effect of installing or 
upgrading spamassassin was to fix the MD5 module.  (either that, or "force 
install Digest::MD5" actually did something...)

Tom 

(*) perhaps because amavisd has this line of code:
BEGIN {
    fetch_modules('REQUIRED BASIC MODULES', 1, qw(
        Exporter POSIX Fcntl Socket Errno Carp Time::HiRes
        IO::File IO::Socket IO::Wrap IO::Stringy
        Digest::MD5 Unix::Syslog File::Basename File::Copy
        Mail::Field Mail::Address Mail::Header Mail::Internet
        (and several more...)

and sure enough, the "fetch_modules" function (defined immediately prior) 
takes an "error reason" as the first parameter, and if the function fails, 
"dies" per that reason...

-- 
Top o' the Blog: Too hot to handle
http://osnut.homelinux.net/mtblog/ya_index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
Url : http://www.sgvlug.net/pipermail/sgvlug/attachments/20051106/88a7acf4/attachment.bin


More information about the SGVLUG mailing list