在哪里可以找到用于在MAMP上配置Sphinx的mysql包含文件

时间:2013-02-07 10:43:17

标签: sphinx

我尝试使用/.configure进行配置 得到以下错误 任何人都可以告诉我如何解决这个问题?我无法找到mysql文件并在MAMP / Library中包含文件夹

任何帮助..

configuring Sphinx
------------------

checking for CFLAGS needed for pthreads... none
checking for LIBS needed for pthreads... -lpthread
checking for pthreads... found
checking whether to compile with MySQL support... yes
checking for mysql_config... not found
checking MySQL include files... configure: error: missing include files.

******************************************************************************
ERROR: cannot find MySQL include files.

Check that you do have MySQL include files installed.
The package name is typically 'mysql-devel'.

If include files are installed on your system, but you are still getting
this message, you should do one of the following:

1) either specify includes location explicitly, using --with-mysql-includes;
2) or specify MySQL installation root location explicitly, using --with-mysql;
3) or make sure that the path to 'mysql_config' program is listed in
   your PATH environment variable.

To disable MySQL support, use --without-mysql option.
******************************************************************************

非常感谢,

2 个答案:

答案 0 :(得分:5)

MAMP缺少一些mysql的库并包含sphinx所需的文件。您必须通过将所需文件复制到MAMP/Library/目录来升级您的MAMP。

  1. 转到MAMP/Library目录并创建mysql目录:
  2. 转到http://downloads.mysql.com/archives.php并下载适当的一个。你可以去phpMyAdmin检查你的MAMP的mysql版本。
  3. 解开它并将include/lib/复制到之前创建的MAMP/Library/mysql
  4. 在终端中,假设您的MAMP位于/Applications/,那么您的配置应如下所示:

    $ ./configure --prefix = / usr / local / sphinx --with-mysql-includes = / Applications / MAMP / Library / mysql / include --with-mysql-libs = / Applications / MAMP / Library / MySQL的/ lib中

  5. 我希望这会有所帮助。您可以查看我的blog这个问题,或者如果您遇到任何其他问题,请告诉我。

答案 1 :(得分:0)

我有同样的错误我所做的是我安装了一个mysql-devel,它适合我的服务器我的mysql-devel.x86_64

  # yum install mysql-devel.x86_64

然后我运行带有mysql的./configure来同时禁用mysql支持

  # ./configure --without-mysql

它对我有用。我能够在消息的最后得到这个

 generating configuration files
 ------------------------------

configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating libstemmer_c/Makefile
config.status: creating doc/Makefile
config.status: creating sphinx.conf.dist
config.status: creating sphinx-min.conf.dist
config.status: creating config/config.h
config.status: executing depfiles commands

 configuration done
 ------------------

You can now run 'make install' to build and install Sphinx binaries.
On a multi-core machine, try 'make -j4 install' to speed up the build.

Updates, articles, help forum, and commercial support, consulting, training,
and development services are available at http://sphinxsearch.com/

Thank you for choosing Sphinx!

希望它有所帮助。