wasshiwa
wasshiwa

Reputation: 296

Installing Sphinx on OS X Lion with Postgresql

So I installed postgresql and the thinking-sphinx gem. I cd into my sphinx download folder and try to run ./configure --with-postgresql

I receive the following message:

#

ERROR: cannot find MySQL include files.

Check that you do have MySQL include files installed. The package name is typically 'mysql-devel'.

If include files are installed on your system, but you are still getting this message, you should do one of the following:

1) either specify includes location explicitly, using --with-mysql-includes; 2) or specify MySQL installation root location explicitly, using --with-mysql; 3) or make sure that the path to 'mysql_config' program is listed in your PATH environment variable.

To disable MySQL support, use --without-mysql option.

#

What should I do? I have also tried install sphinx using brew, but that hasn't worked either. I'm desperate. I just spent three hours trying to configure this, and I have gotten nowhere.

My sphinx.yml looks like this, and i'm not sure if it's correct:

development:
  port: 9310
  bin_path: "/usr/bin"
  searchd_binary_name: searchd
  indexer_binary_name: indexer

test:
  port: 9310
  bin_path: "/usr/bin"
  searchd_binary_name: searchd
  indexer_binary_name: indexer

production:
  version: '1.10-beta'

Upvotes: 1

Views: 2239

Answers (2)

Rimian
Rimian

Reputation: 38458

I used homebrew. According to the docs at thinking-sphinx, you need the mysql extension even if you are using postgres.

I mucked around with a few configurations but sphinx kept looking to connect to MySQL.

This worked for me:

brew install sphinx --mysql --pgsql

Which configured:

./configure --with-mysql --with-pgsql

Then it seemed to work.

See: https://github.com/pat/thinking-sphinx

Upvotes: 5

emcconville
emcconville

Reputation: 24439

I agree with Tass. You wold run Sphinx's configure script with --without-mysql & --with-pgsql. I have PostgreSQL installed in /usr/local; therefor, my configuration options would be:

shell~> ./configure --without-mysql --with-pgsql=/usr/local

Upvotes: 1

Related Questions