Kelseydh Kelseydh - 10 months ago 51
Ruby Question

dyld: lazy symbol binding failed: Symbol not found: __gdbm_lock_file error with GDBM gem

I'm getting this odd error when I try to use the Ruby GDBM gem. The gem used to work. Now when I invoke it I get this error (across many different versions of ruby):

dyld: lazy symbol binding failed: Symbol not found: __gdbm_lock_file
Referenced from: /usr/local/lib/libgdbm.dylib
Expected in: flat namespace

dyld: Symbol not found: __gdbm_lock_file
Referenced from: /usr/local/lib/libgdbm.dylib
Expected in: flat namespace


I've tried numerous ruby versions, executing directly from Rbenv and even installing/uninstalling my brew GDBM installation. My GDBM Brew installation is at
/usr/local/Cellar/gdbm/1.12
GDBM works when I invoke it manually from the command line (e.g.
gdbm_load
).

The only thing I can think has changed is that I'm now running on OSX El Capitan 10.11.6. Or that I somehow made a change to my config or PATH files that could have caused this error.

How can I go about resolving this?

Answer Source

The GDBM ruby gem's maintainer has confirmed it's an issue with either HomeBrew or GDBM itself.

Manually installing GDBM without using HomeBrew, or installing it with:

brew install gdbm --build-from-source

can fix the problem.