Compiling mnogosearch with MySQL support & PHP extension on 64bit Centos5

We just got a new dedicated server, running Centos 5.  I’ve just been moving some php websites which use the mnogosearch extension, and finally cracked it.

The main problem I was getting was:

/usr/bin/ld: cannot find -lmysqlclient

Here is a rough outline of what I had to do:

Install Mysql development

  1. yum install mysql-devel

Download & build mnogosearch

  1. wget http://www.mnogosearch.org/Download/mnogosearch-3.3.8.tar.gz
  2. edit “configure” script so that MYSQL_LIBDIR=/usr/lib64/mysql
  3. install.pl choosing appropriate options (I chose yes for build shared libraries)
  4. make
  5. make install

Build PHP extension

  1. cd mnogosearch-3.3.8/php
  2. follow instructions in  README file here
  3. service httpd restart

(I tried to get it working with PostgreSQL support too, but kept getting “/usr/bin/ld: cannot find -lpq”. The fix for setting the library path in the configure file didn’t seem to work in this case, but I didn’t try too hard.)

3 thoughts on “Compiling mnogosearch with MySQL support & PHP extension on 64bit Centos5

  1. Thanks! I was dealing with this exact issue today as well and have spent most of the afternoon fighting it. Great timing on that post ;)

Leave a Reply to Julian Cancel reply

Your email address will not be published. Required fields are marked *