今天編譯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 ,安裝成功!