Problem with DB_FIle - Solved

Posted by EricR on 2008-04-21 09:56
Forums: PPM | OS: OS X 10.5 (Leopard)

I'm trying to carry out some remote debugging with some Perl CGI scripts. My Mac with Leopard already had Perl installed but I needed some other Perl modules, including DB_File, so I installed ActivePerl in a separate directory, choosing the default one of /usr/local/ActivePerl-5.8/bin, and used PPM to install the missing modules. I changed PATH so that this directory came at the beginning.

I have a script that checks that the extra modules that I need are loaded but when I include the DB_File as one of the required modules I get the following dyld error:

dyld: lazy symbol binding failed: Symbol not found: _db_version
  Referenced from: /usr/local/ActivePerl-5.8/site/lib/auto/DB_File/DB_File.bundle
  Expected in: dynamic lookup

dyld: Symbol not found: _db_version
  Referenced from: /usr/local/ActivePerl-5.8/site/lib/auto/DB_File/DB_File.bundle
  Expected in: dynamic lookup

I wonder if this is a problem with BerkeleyDB. I think at some stage in my checking I managed to avoid this error but I can't now recall what the circumstances were. I haven't installed BerkeleyDB but assumed that it was already available in the Mac. With a Windows installation of ActivePerl I don't have this problem with BerkeleyDB and I seem to recall that it came with ActivePerl but I don't know if this is the case with the Mac version.

Searching for I see that it's in /System/Library/Perl/5.8.8/darwin-thread-multi-2level/ as well as in /usr/local/ActivePerl-5.8/lib (and site/lib), and I wonder if the former is part of the pre-installed version of Perl and that this is somehow causing the problem I have.

Can anyone suggest why I'm getting this error and how I can get rid of it?
I've now found the solution to this.

For some reason or other DB_File didn't show up in PPM but I discovered that in fact it wasn't missing from my Perl installation. I uninstalled DB_FIle using the PPM and everything is working OK now - I can set up a BerkeleyDB file without any bother.