1

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

任何帮助..

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.
******************************************************************************

非常感谢,

4

2 回答 2

5

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

  1. 转到您的MAMP/Library目录并创建 mysql 目录:
  2. 转到http://downloads.mysql.com/archives.php并下载相应的。你可以去 phpMyAdmin 检查你的 MAMP 的 mysql 版本。
  3. include/解压它并将and复制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

我希望这有帮助。您可以查看我关于此问题的博客,或者如果您遇到任何其他问题,请告诉我。

于 2013-07-21T04:34:34.243 回答
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!

希望它有所帮助。

于 2014-07-18T06:53:11.560 回答