在ubuntu上安装sphinx
我使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过
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.您需要安装
libmysqlclient-dev
软件包,否则mysql_config
(根据您发布的回溯而丢失的部分内容)将不会出现在您的计算机上。安装软件包后,您可以使用
which
命令来查找mysql_config
在我的 Ubuntu 机器上,它是
/usr/bin/mysql_config
You need to install the
libmysqlclient-dev
package otherwisemysql_config
, part of what you missing based on the traceback you posted, won't be on your machine.You can use the
which
command to locatemysql_config
after installing the packageOn my Ubuntu machine it's
/usr/bin/mysql_config