Search code examples
mysqlruby-on-railsrubysphinxthinking-sphinx

Unable to install a previous version of Sphinx


I'm trying to install a previous version of Sphinx i.e. 2.1.7, and here is what I did to accomplish the goal:

  1. Downloaded the old version from this link, and extracted it at Desktop.

  2. Entered in to the project directory, and cd ~/Downloads/sphinx/sphinx/api/libsphinxclient, and did ./configure --with-mysql

  3. Did make & make install.
  4. Included ~/Downloads/sphinx/sphinx/bin in $PATH, and wrote this functionality in .bash_profile.
  5. Now, when I do searchd --version, it gives me the following error:

    dyld: Library not loaded: /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib Referenced from: /Users/arslanali/Downloads/sphinx/bin/searchd Reason: image not found Trace/BPT trap: 5

Now, I've tried every solution to get rid of this error, but unable to get it resolved.

Edit:

I'd had the latest version of MySQL, and when returned to previous, the mentioned error went away, but now I'm facing the following error each time I do: searchd --version,

dyld: Library not loaded: /opt/local/lib/libexpat.1.dylib
  Referenced from: /Users/arslanali/Downloads/sphinx/bin/searchd
  Reason: Incompatible library version: searchd requires version 8.0.0 or later, but libexpat.1.dylib provides version 7.0.0
Trace/BPT trap: 5

Solution

  • I was facing same issue, I was trying to compile the binary release, Its already compiled (which is why you have a searchd command despite not compiling). So we need source of thinking sphinx in order to compile it successfully.

    1) Downloaded source from
    http://sphinxsearch.com/downloads/sphinx-2.1.7-release.tar.gz/thankyou.html

    2) Un-zip downloaded file.

    3) Cd into unzipped folder.

    4) Run following commands.

    ./configure --with-mysql
    make 
    make install
    

    5) Done :)