在ubuntu上安装sphinx

koo*_*gua 1 ubuntu sphinx

我安装了MySQL apt-get

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

/usr/bin/mysql
/var/lib/mysql
/var/log/mysql
/etc/mysql/my.cnf
Run Code Online (Sandbox Code Playgroud)

遵循sphinx文档的说明:

$ ./configure
Run Code Online (Sandbox Code Playgroud)

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

--with-mysql,如果自动检测失败,则指定查找MySQL包含和库文件的位置;


我收到以下错误:

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
Run Code Online (Sandbox Code Playgroud)

我应该在哪里找它寻找MySQL?

$ ./configure --with-mysql=WHICH PLACE?
Run Code Online (Sandbox Code Playgroud)

Mik*_*ike 6

你试过sudo apt-get install sphinxsearch吗?不确定为什么要尝试从源代码编译它而不是使用现有的Ubuntu包.

  • 此外,使用此方法的最新二进制文件是0.9.9版本,最新的sphinx是2.0.3 (3认同)

chr*_*guy 5

您需要安装该libmysqlclient-dev软件包,否则mysql_config,基于您发布的回溯,您遗失的部分内容将不在您的计算机上.

shell$ sudo apt-get install libmysqlclient-dev
Run Code Online (Sandbox Code Playgroud)

您可以在安装软件包后使用该which命令进行定位mysql_config

shell$ which mysql_config
Run Code Online (Sandbox Code Playgroud)

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