在ubuntu上安装sphinx

发布于 2024-12-14 04:51:37 字数 726 浏览 2 评论 0原文

我使用 apt-get 安装了 MySQL,

Ubuntu 将 mysql 文件分离到以下位置:

/usr/bin/mysql
/var/lib/mysql
/var/log/mysql
/etc/mysql/my.cnf

按照 sphinx 文档中的说明进行操作:

$ ./configure

--prefix,它指定安装 Sphinx 的位置;例如 --prefix=/usr/local/sphinx (所有示例都使用此前缀)

--with-mysql,它指定在哪里查找 MySQL include 和库文件,如果自动检测失败;


我收到以下错误:

checking whether to compile with MySQL support... yes
configure: error: invalid MySQL root directory '/usr/bin'; neither bin/mysql_config, nor include/ and lib/ were found there

我应该告诉它在哪里查找 MySQL?

$ ./configure --with-mysql=WHICH PLACE?

I installed MySQL with apt-get

Ubuntu separates the mysql files to the following locations:

/usr/bin/mysql
/var/lib/mysql
/var/log/mysql
/etc/mysql/my.cnf

Following the instructions from sphinx document:

$ ./configure

--prefix, which specifies where to install Sphinx; such as --prefix=/usr/local/sphinx (all of the examples use this prefix)

--with-mysql, which specifies where to look for MySQL include and library files, if auto-detection fails;


I get the following error:

checking whether to compile with MySQL support... yes
configure: error: invalid MySQL root directory '/usr/bin'; neither bin/mysql_config, nor include/ and lib/ were found there

Where should I tell it to look for MySQL?

$ ./configure --with-mysql=WHICH PLACE?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

筱果果 2024-12-21 04:51:37

您是否尝试过sudo apt-get install sphinxsearch?不知道为什么你要尝试从源代码编译它而不是使用现有的 Ubuntu 软件包。

Have you tried sudo apt-get install sphinxsearch? Not sure why you're trying to compile it from source instead of using the existing Ubuntu package.

巷子口的你 2024-12-21 04:51:37

您需要安装libmysqlclient-dev软件包,否则mysql_config(根据您发布的回溯而丢失的部分内容)将不会出现在您的计算机上。

shell$ sudo apt-get install libmysqlclient-dev

安装软件包后,您可以使用 which 命令来查找 mysql_config

shell$ which mysql_config

在我的 Ubuntu 机器上,它是 /usr/bin/mysql_config

You need to install the libmysqlclient-dev package otherwise mysql_config, part of what you missing based on the traceback you posted, won't be on your machine.

shell$ sudo apt-get install libmysqlclient-dev

You can use the which command to locate mysql_config after installing the package

shell$ which mysql_config

On my Ubuntu machine it's /usr/bin/mysql_config

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文