Archive

Posts Tagged ‘Search’

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

2014/02/15 6 comments

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
http://sphinxsearch.com/contacts.html

I hope this tip can help someone …

Advertisements