2011-11-06 47 views
1

安装狮身人面像我apt-get安装了MySQL在Ubuntu

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

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

在从狮身人面像文件的说明:

$ ./configure 

--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 

,我应该告诉它寻找MySQL的?

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

非常感谢你 – koogua

回答

5

您需要安装libmysqlclient-dev包,否则mysql_config,基于您发布的回溯丢失的部分内容将不会在您的机器上。

shell$ sudo apt-get install libmysqlclient-dev 

可以使用which命令安装包

shell$ which mysql_config 

在我的Ubuntu的机器是/usr/bin/mysql_config

6

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

+0

我知道你提供的方法后定位mysql_config,它作品。但我想尝试编译方法。 – koogua

+3

此外,使用此方法的最新二进制文件版本是0.9.9,最新的sphinx是2.0.3 –

+0

以下是2.0.3的deb安装。 https://launchpad.net/~chris-lea/+archive/sphinxsearch –