【问题标题】:Installing Sphinx on OS X Lion with Postgresql使用 Postgresql 在 OS X Lion 上安装 Sphinx
【发布时间】:2012-06-22 00:21:09
【问题描述】:

所以我安装了 postgresql 和 thinking-sphinx gem。我 cd 进入我的 sphinx 下载文件夹并尝试运行 ./configure --with-postgresql

我收到以下消息:

#

错误:找不到 MySQL 包含文件。

检查您是否安装了 MySQL 包含文件。 包名通常是“mysql-devel”。

如果你的系统上安装了包含文件,但你仍然得到 此消息,您应该执行以下操作之一:

1) 使用 --with-mysql-includes 明确指定包含位置; 2) 或使用 --with-mysql 明确指定 MySQL 安装根目录; 3) 或确保 'mysql_config' 程序的路径列在 你的 PATH 环境变量。

要禁用 MySQL 支持,请使用 --without-mysql 选项。

#

我该怎么办?我也尝试过使用 brew 安装 sphinx,但这也没有奏效。我很绝望。我只花了三个小时尝试配置它,但我一无所获。

我的 sphinx.yml 看起来像这样,我不确定它是否正确:

development:
  port: 9310
  bin_path: "/usr/bin"
  searchd_binary_name: searchd
  indexer_binary_name: indexer

test:
  port: 9310
  bin_path: "/usr/bin"
  searchd_binary_name: searchd
  indexer_binary_name: indexer

production:
  version: '1.10-beta'

【问题讨论】:

  • 我会说使用--without-mysql

标签: ruby-on-rails ruby-on-rails-3 postgresql sphinx thinking-sphinx


【解决方案1】:

我用的是自制软件。根据thinking-sphinx 的文档,即使您使用的是postgres,也需要mysql 扩展。

我搞砸了一些配置,但 sphinx 一直在寻找连接到 MySQL。

这对我有用:

brew install sphinx --mysql --pgsql

哪些配置:

./configure --with-mysql --with-pgsql

然后它似乎工作了。

见: https://github.com/pat/thinking-sphinx

【讨论】:

  • 我需要去哪里运行./configure?
【解决方案2】:

我同意塔斯的观点。您将使用 --without-mysql--with-pgsql 运行 Sphinx 的配置脚本。我在/usr/local 中安装了 PostgreSQL;因此,我的配置选项是:

shell~> ./configure --without-mysql --with-pgsql=/usr/local

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-23
    • 2012-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多