Sphinx 2.0.4 Install Error with MAMP 2.0: Can't Find MySQL Headers

瘦欲@ 提交于 2019-12-04 20:14:05

Sphinx's ./configure uses an unknown default value for --with-mysql, which is enabled by default, which could make you think calling it is not necessary.

To get Sphinx to work with MAMP's varyingly distributed MySQL files, make sure to use each of the following attributes in your ./configure command, specifying direct paths for each:

--with-mysql= // root mysql app
--with-includes= // path to mysql header includes
--with-mysql-libs= // path to libmysqlclient.dylib files

The final command that worked for me:

./configure --prefix=/usr/local/sphinx --with-libstemmer --with-mysql=/Applications/MAMP/Library --with-mysql-includes=/Applications/MAMP/Library/include/mysql --with-mysql-libs=/Applications/MAMP/Library/lib/mysql

--prefix is your preferred install directory in usr/local and --libstemmer adds Snowball's extended stemming functionality (if you downloaded it).

If this runs without error, just make and make install and you're good to go.

Also note that there's a configure error log in the uncompressed Sphinx directory that's easy to overlook. Didn't help in this scenario, but could be really useful to others if you're having problems.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!