How to install Sphinx search engine in Snow Leopard, x86 and x86_64

sphinx
Sphinx is a free and open source SQL full-text search engine.
I assume you already have installed Xcode from Snow Leopard DVD.

First step is to download Sphinx, for this little guide we are going to use a beta.

cd into your favourite directory, mine is ‘src’ in my homedir.

cd src
curl -O http://www.sphinxsearch.com/downloads/sphinx-0.9.9-rc2.tar.gz

Decompress:

tar zxvf sphinx-0.9.9-rc2.tar.gz
cd sphinx-0.9.9-rc2/

For 32-bit users:

./configure --prefix=/usr/local

For 64-bit users:

LDFLAGS="-arch x86_64" ./configure --prefix=/usr/local

Remember that you can also specify sphinx to use MySQL this way, by appending this string to ./configure:

--with-mysql=/usr/local/mysql

or/and PostgreSQL

--with-pgsql

All users:

make
sudo make install

We are done.
If you encounter some errors, be sure to search for ‘mysql’ in this website, and follow the guide.

$1.99 domains with SSL purchase!

4 thoughts on “How to install Sphinx search engine in Snow Leopard, x86 and x86_64

  1. hey, did you use which mysql for the path –with-mysql=

    I recently upgraded to snow leopard and i am getting a bin_path error on indexing that i cant get around.

  2. When I try to do “sudo make”, I have this error, and I donĀ“t understand why… :(

    Making all in src
    if test -d ../.svn; then svn info .. –xml | perl svnxrev.pl; fi;
    make all-am
    make[2]: Nothing to be done for `all-am’.
    Making all in test
    make[1]: Nothing to be done for `all’.
    make[1]: Nothing to be done for `all-am’.

    Please, could you help me?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">