使用Postgresql在OS X Lion上安装Sphinx

kyo*_*ine 1 postgresql sphinx ruby-on-rails thinking-sphinx ruby-on-rails-3

所以我安装了postgresql和思考sphinx宝石.我进入我的sphinx下载文件夹并尝试运行./configure --with-postgresql

我收到以下消息:

#

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

检查是否安装了MySQL包含文件.包名称通常是"mysql-devel".

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

1)使用--with-mysql-includes明确指定包含位置; 2)或使用--with-mysql明确指定MySQL安装根位置; 3)或确保您的PATH环境变量中列出了'mysql_config'程序的路径.

要禁用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'
Run Code Online (Sandbox Code Playgroud)

Rim*_*ian 5

我用的是自制软件.根据思考-sphinx的文档,即使你使用的是postgres,也需要mysql扩展.

我使用了一些配置,但sphinx一直在寻找连接到MySQL.

这对我有用:

brew install sphinx --mysql --pgsql
Run Code Online (Sandbox Code Playgroud)

哪个配置:

./configure --with-mysql --with-pgsql
Run Code Online (Sandbox Code Playgroud)

然后它似乎工作.

请参阅:https: //github.com/pat/thinking-sphinx