gpt4 book ai didi

ruby-on-rails - 使用 Postgresql 在 OS X Lion 上安装 Sphinx

转载 作者:行者123 更新时间:2023-11-29 12:31:41 24 4
gpt4 key购买 nike

所以我安装了 postgresql 和 thinking-sphinx gem。我进入我的 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'

最佳答案

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

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

这对我有用:

brew install sphinx --mysql --pgsql

其中配置:

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

然后它似乎起作用了。

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

关于ruby-on-rails - 使用 Postgresql 在 OS X Lion 上安装 Sphinx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11148680/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com