Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: missing edit-log entry for this revision

Razor2 check fails with Can't locate object method "new"

This is unfortunately a more common problem than it should be, and it's not directly caused by SpamAssassin but by an unkempt perl installation.

You can see information in bug 2314: http://bugzilla.spamassassin.org/show_bug.cgi?id=2314 which should help you to clean up your installation.

But in short:

What I found on the one box I looked at which exhibited this behavior is that the user had two versions of Digest::SHA1 "installed". 2.04 which was fully installed, and 2.01 which only had the .pm (none of the XS libraries). The "use lib" in SA caused the 2.01 pm to be loaded, but the only libraries it could find was 2.04, which caused DynaLoader to barf.

What I did was to run the following:

No Format
$ perl -e 'use lib "/usr/lib/perl5/site_perl/5.6.0"; use Razor2::Client::Agent;'

changing that path as appropriate to whatever SA's install does.

What I ended up seeing was:

No Format
Digest::SHA1 object version 2.04 does not match bootstrap parameter 2.01 at /usr/lib/perl5/5.6.0/ppc-linux/DynaLoader.pm line 219.
Compilation failed in require at /usr/lib/perl5/site_perl/5.6.0/ppc-linux/Razor2/String.pm line 4.

I then looked around the directories and found the different versions as mentioned above.