ant has asked for the wisdom of the Perl Monks concerning the following question:


I'm installing the BerkeleyDB module using this command

ppm install c:\downloads\BerkeleyDB.ppd

This installs fine, however when I then test the module in my Perl script I get this error.

BerkeleyDB object version 0.22 does not match bootstrap parameter 0.31

Any ideas on whats gone wrong?

Thanks in Advance


Replies are listed 'Best First'.
Re: Install Module issue
by jettero (Monsignor) on Apr 30, 2007 at 11:17 UTC
    Seems like you have two versions of the module installed and perl is loading pieces of one and pieces of the other. I think ppm is intended to be used as a network installer and probably uses better magic that way.

    Have you seen DB_File? I believe that comes with (active)perl.

    If I needed the advanced features of 2.x+, then I would run ppm and "install BerkeleyDB" from the ppm shell. I'm pretty sure ppm even has a GUI now.


      The command line version of "ppm" is still there if you want it, but it can be hard to find. You have to use "ppm-shell" now if you want to get to the non-GUI version. "ppm" by itself launches the GUI version, which takes some of your time waiting while it resynchronizes, and some of your thinking time as you adapt to the new interface. (Once you do adapt, it has some nice features, but a somewhat innovative "take" on its user interface, IMHO.)
        The command line version of "ppm" is still there if you want it, but it can be hard to find

        Hmmm ... I just ran ppm install Win32-API in a fresh installation of the latest ActiveState build (820) and it installed just fine - thankfully without launching any GUI crap at all. This seems to be in contradiction to your post - or have I misunderstood something ?

Re: Install Module issue
by Herkum (Parson) on Apr 30, 2007 at 11:51 UTC

    The BerkeleyDB.ppd you are trying to install is version 0.22 and it is complaining that it needs 0.31.

    I went and loaded up ppm and version 0.22 was in the Activestate repository. If you are using this on a *NIX system you can probably install the module via cpan install of ppm.

      If Dynaloader is complaining about the version number as I suspected, is there not a way of specifying the version number to be used for the module that you are calling.
      Tried looking this idea up and the code I could find went along these lines,

      use BerkeleyDB 0.22;

      But this failed to work, it still gave exactly the same error message.
      Can I specifically state which version of the Perl module to use?
        Can I specifically state which version of the Perl module to use?

        No - the first that gets found, gets loaded. If that's not the that you want then you'd need to re-arrange the order in which the directories are being searched, so that the one you want to load does get found first.

        But that's all beside the point anyway - things are broken and need to be fixed. Version 0.31 of is being loaded, but the BerleleyDB.dll that gets loaded is version 0.22. I would try uninstalling BerkeleyDB by running ppm remove BerkeleyDB and re-installing by running ppm install BerkeleyDB. If that doesn't take care of the mismatch then you might have to look at manually removing the BerkeleyDB installation(s) before re-installing it.