xiayu 发表于 2018-10-1 10:31:50

sphinx安装报错找不到mysql-devel

  今天编译sphinx,报找不到mysql相关文件。之前已经yum install mysq-devel,也已经源码包编译mysql了。
  编译执行:./configure –prefix=/usr/local/coreseek –without-unixodbc –with-mmseg –with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ –with-mmseg-libs=/usr/local/mmseg3/lib/ –with-mysql
  checking MySQL include files… configure: error: missing include files.
  ******************************************************************************
  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.
  如何解决:
  mysql编译安装在/usr/local/mysql,把/usr/local/mysql/lib/加入到 /etc/ld.so.conf执行ldconfig.
  这样configure安装也不行。
  干脆执行:./configure –prefix=/usr/local/coreseek –without-unixodbc –with-mmseg –with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ –with-mmseg-libs=/usr/local/mmseg3/lib/ –with-mysql=/usr/local/mysql ,安装成功!

页: [1]
查看完整版本: sphinx安装报错找不到mysql-devel