Freelancing Gods 2015

29 Oct 2007

Sphinx Quick Fix

Here’s one small filesystem tweak that’s been handy as I’ve been slowly rebuilding my development environment on Leopard over the last couple of days. It’s to get Sphinx working – there was no problems with compilation or installation, but when I ran searchd or indexer, it complained about not finding the mysql libraries:

dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
  Referenced from: /usr/local/bin/indexer
  Reason: image not found

Now, the expected file path is incorrect – it shouldn’t have the second ‘mysql’. My attempts to change that with various configuration flags didn’t work, so I cheated, and added the folder as a symbolic link:

sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql

Suggestions of a cleaner solution always welcome.


4 responses to this article

04 Jul 2008
Jon Crawford said:

Hey, I just found this article while having similar issues. I found this article at the same time.

Towards the bottom it speaks about these issues and offers a different solution and an explanation for the problem. I went with your solution for fear of screwing up my currently-functioning Rails stack.

I don’t understand all the mechanics of everything, but if you think the other article is a better solution, please let me know.


04 Jul 2008
pat said:

Hi Jon

Good to know this post was helpful to someone. Looking at the other solution, I’m not sure which is better – they are using an Apple CLI tool, so perhaps that’s the recommended solution… but like you, I don’t have my head around the mechanics of it all, so I’m not sure.

18 May 2009
Reset said:

Late response, but this might be helpful for somebody.

When you ./configure sphinx you should specify your lib and includes directory like this..

./configure —with-mysql-includes=/usr/local/mysql/include/mysql/ —with-mysql-libs=/usr/local/mysql/lib/mysql/

That should solve your problem.

28 Apr 2015
folding 3 5 inch said:

Thanks for every other informative blog. Where else may just I am getting that kind
of info written in such an ideal approach? I have a mission that I am
simply now working on, and I have been on the glance out
for such information.

Leave a Comment

Comments are formatted using Textile. Please be respectful of others when posting comments. Be nice.

RssSubscribe to the RSS feed

Related Links

Related Posts

About Freelancing Gods

Freelancing Gods is written by , who works on the web as a web developer in Melbourne, Australia, specialising in Ruby on Rails.

In case you're wondering what the likely content here will be about (besides code), keep in mind that Pat is passionate about the internet, music, politics, comedy, bringing people together, and making a difference. And pancakes.

His ego isn't as bad as you may think. Honest.

Here's more than you ever wanted to know.

Open Source Projects

Other Sites

Creative Commons Logo All original content on this site is available through a Creative Commons by-nc-sa licence.