Home > CentOS, MySQL, Snippets of Code > How to fix failed dependencies when installing rpm Sphinx Search on CentOs

How to fix failed dependencies when installing rpm Sphinx Search on CentOs

Trying to install the open source Sphinx Search Engine on my CentOs Linux server I got these errors:

wget "http://sphinxsearch.com/files/sphinx-2.1.5-1.rhel6.x86_64.rpm"
rpm -i sphinx-2.1.5-1.rhel6.x86_64.rpm

error: Failed dependencies:
libodbc.so.2()(64bit) is needed by sphinx-2.1.5-1.rhel6.x86_64
libpq.so.5()(64bit) is needed by sphinx-2.1.5-1.rhel6.x86_64

It means there are some libraries left in the system. To find out which are they I used this command:

yum provides **/libpq.so.5

This way I could install the missing libraries:

yum install unixODBC unixODBC-devel postgresql-libs

And then, I tried again (successfully this time) to reinstall Sphinx Search:

# rpm -i sphinx-2.1.5-1.rhel6.x86_64.rpm

Sphinx installed!
Now create a full-text index, start the search daemon, and you're all set.

To manage indexes:
editor /etc/sphinx/sphinx.conf

To rebuild all disk indexes:
sudo -u sphinx indexer --all --rotate

To start/stop search daemon:
service searchd start/stop

To query search daemon using MySQL client:
mysql -h 0 -P 9306
mysql> SELECT * FROM test1 WHERE MATCH('test');

See the manual at /usr/share/doc/sphinx-2.1.5 for details.

For commercial support please contact Sphinx Technologies Inc at

I hope this tip can help someone …

  1. 2017/08/16 at 4:56 am

    Los 5 coches con la velocidad punta más alta del 2016.

  2. 2017/03/31 at 3:27 am

    This piece of writing will assist the internet users for setting up new weblog or even a weblog from start to end.

  3. 2016/11/12 at 4:35 am

    WOW just what I was searching for. Came here by searching for dc travel

  4. 2016/08/27 at 3:51 pm

    This is a very good tip especially to those new to the blogosphere.
    Simple but very precise information… Appreciate your sharing this
    one. A must read post!

  5. 2016/08/13 at 1:23 pm

    Our company is several professionals who perform hearthstone because beta exactly who
    frequently achieve best hundred legend positions, therefore we’ve got wide range of skills allowing you to
    enhance your fast!

  6. 2014/06/18 at 5:38 am

    Your tip was very helpful indeed. Thanks

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: