now available

now available
Want fresh tech tips in your inbox?

Installing Sphinx Search Engine on Mac OS X... or ld: library not found for -lmysqlclient


If you are trying to install Sphinx on Mac OS X, it will most likely fail. The current version of MySQL bundled with Mac OS X is not supported and therefore, it will spit out the error message because it can't find the correct libraries.

 ld: library not found for -lmysqlclient

There is a quick solution to the problem -upgrade mysql! You'll need Mac Ports installed, available at http://macports.org/

Run the command

sudo port install mysql5
This will not destroy any existing data from your previous MySQL installation. The mac port installation will take a while, and it will appear as if it is just hanging. It's not. It just takes a while. I clocked it at 15 minutes on a relatively fast network connection. Drink a cappuccino!

After you have the upgrade you'll need to download Sphinx available at: http://sphinxsearch.com/downloads.html (latest stable) and build the Sphinx engine from source like so:

wget http://sphinxsearch.com/downloads/sphinx-
tar xzvf sphinx-
cd  sphinx-
./configure --with-mysql-libs=/opt/local/lib/mysql5/mysql/
sudo make install

Much thanks to this post b/c I spent forever trying to get the bundled version of MySQL linked properly: http://www.fozworks.com/2008/9/5/rake-installation-of-sphinx-in-mac-osx

Tagged w/ #development #environment #mac os x #sphinxprogramming

Apps I've Built

XPath Expression Editor
Practice and improve your XPath skills with XPath Editor
Click to buy on the App Store
Photo Location Changer
Easily change the location on your photos and videos
Click here for more info about the app
Photo Date Changer
Easily change the dates and times on your photos and videos
Click here for more info about the app
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app