Archive for June, 2009

Sphinx + Mac + Postgresql = unknown type ‘pgsql’; skipping

Hey Everyone,

I’m posting this blog article due to the fact I had this problem and never found a solution online. With the help of Pat Allen and the ThinkingSphinx google group I was able to find a solution. My problem had nothing to do with not compiling using (–with-pgsql) it was far more obscure. I’m using ThinkingSphinx as a search tool in my Ruby on Rails application. This was my first Mac and when it came to indexing sphinx I would get the following error…

using config file ‘/Users/Chris/obilling/config/
development.sphinx.conf’…
indexing index ‘account_core’…
ERROR: source ‘account_core_0′: unknown type ‘pgsql’; skipping.
ERROR: index ‘account_core’: no valid sources configured; skipping.
distributed index ‘account’ can not be directly indexed; skipping.

The problem was initially created due to the fact I had tried to install sphinx using macports (sudo port install sphinx). After the macport install things weren’t working properly so I did a manual install using the following resource as a guide (). All of the articles I found said the problem was the fact I didn’t compile using ./configure –with-pgsql –without-mysql. This wasn’t the case as you can see in the resource I provided, I did compile it with pgsql support and the ./configure supported that. It all looked fine. I spent the next week working with Pat Allen and the ThinkingSphinx google group to come up with the solution.

I’m not sure if every step here is required, but I will outline the steps I followed…

First I checked to see if “searchd” was located in the opt/local/bin/ folder or in the /usr/local/bin folder.

From the terminal…

which searchd

My output showed opt/local/bin/ which indicated it was still using the macports install.

I then went about renaming these files…

cd /opt/local/bin/
sudo mv searchd searchdold
sudo mv indexer indexerold

I then uninstalled the macports install…

sudo port uninstall sphinx

and finally… I re-installed sphinx and the proper libraries manually using the following resource…
Installing Sphinx with Postgres on Leopard

Many thanks to Maxim Chernya @ Medium exposure for writing a great article on the installation process.

7 Comments