I am trying to install sphinx on my centOS 5.6 x64

if I do yum install sphinx I get only 0.9,9 version, and I'd like to install 2.0.1-beta

so I followed the instructions in their documentation and I downloaded source tarball and run

./configure --with-mysql

I am getting an error that cannot find mysql include files

so I found out I need to install mysql-deve (yum install mysql-devel) but as it turned out I already had it.

so I tried to locate my mysql include files and after some digging I found out how to get the info where it is located

$ mysql_config --include

so this gives me:


so I repeated the exercise like:

./configure --prefix /usr/local/sphinx --with-mysql=/usr/include/mysql/

wich gave me this:

configure: error: invalid MySQL root directory '/usr/include/mysql'; neither bin/mysql_config, nor include/ and lib/ were found there

I tred without trailing slash too

so what am I to do?

please help!

1 Answer 1


Yes, the configuration script need to know the prefix where MySQL is installed and in your case that's /usr, so you can use the following command:

./configure --with-mysql=/usr --with-mysql-includes=/usr/include/mysql

Also, you may need another devel packages, not only mysql-devel.

EDIT: BTW have you noticed that there's a 64bit RPM package of Sphinx 2.0.1-beta for RHEL/CentOS 5? It's on the downloads page.

  • Your suggestion gives me: ...... ERROR: cannot find MySQL include files. :( Oct 5, 2011 at 16:56
  • Are you sure that you have mysql-devel installed? I added more command line options to my answer above (and some additional information). Oct 5, 2011 at 17:13
  • Yes I msut be really blind! I installed that rpm with no problems, it is working now! thanx Oct 5, 2011 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.