【问题标题】:Where to find mysql include files for configuring Sphinx on MAMP在哪里可以找到用于在 MAMP 上配置 Sphinx 的 mysql 包含文件
【发布时间】:2013-02-07 10:43:16
【问题描述】:

我尝试使用/.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.
******************************************************************************

非常感谢,

【问题讨论】:

标签: sphinx


【解决方案1】:

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

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

【讨论】:

  • 我试过这个,当我下载:mysql-5.5.25a.tar.gz 我没有找到 lib 文件夹我确实找到了 libservices、libmysqld 和 libmysql ...我要去试试 libmysql ...
  • @Mark Steudel 我不明白你的意思是什么,你解决问题了吗?如果没有,请详细说明,以便我为您提供帮助。
【解决方案2】:

我遇到了同样的错误,我安装了一个适合我的服务器的 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!

希望对您有所帮助。

【讨论】:

    猜你喜欢
    • 2016-09-19
    • 2011-02-10
    • 2017-02-23
    • 1970-01-01
    • 1970-01-01
    • 2020-10-03
    • 2015-02-23
    • 1970-01-01
    • 2017-03-06
    相关资源
    最近更新 更多