Wednesday, July 6, 2011

searchd giving error "dyld: Library not loaded: libmysqlclient.18.dylib" on Mac

On Mac system, in one of my application using Thinking Sphinx. After installation while running searchd, it gives following errors:

$ searchd
dyld: Library not loaded: libmysqlclient.18.dylib
  Referenced from: /usr/local/bin/searchd
  Reason: image not found
Trace/BPT trap
-:sphinx-0.9.8 ror$ cd ..
-:Downloads ror$ l
-bash: l: command not found

It's because unable to find the libmysqlclient library. Add the following to to your ~/.profile:

export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
and it will work fine

No comments:

Post a Comment