0

当我尝试配置 Sphinx 搜索时,我得到以下信息,我相信很多人以前都见过......

(在 Linux VPS 上使用 Cent OS。Sphinx tarball 已下载并解压缩。)

ERROR: cannot find MySQL include files.

Check that you do have MySQL include files installed.
The package name is typically 'mysql-devel'.

If include files are installed on your system, but you are still getting
this message, you should do one of the following:

1) either specify includes location explicitly, using --with-mysql-includes;
2) or specify MySQL installation root location explicitly, using --with-mysql;
3) or make sure that the path to 'mysql_config' program is listed in
your PATH environment variable.

To disable MySQL support, use --without-mysql option.

所以,我跑去# which mysql-includes找到那个,这就是我得到的……

/usr/bin/which: no mysql-devel in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

那也可能是一种外星语言,现在我被困住了。我知道 MySQL 已安装在我的服务器上,因为我有已设置并正在使用的数据库。谁能帮我克服这个障碍?

另外,如何使用类似的东西的一个很好的例子是什么--with-mysql-includes

4

1 回答 1

2
yum install mysql-devel  

这将从 CentOS 存储库中获取 mysql 开发包

于 2012-12-04T16:04:24.320 回答