coreseek-3.2.14 版本 解压后csft-3.2.14 (这个就是sphinx)mmseg-3.2.14 (分词程序)
附上下载链接 http://download.csdn.net/detail/liumeng305/8911133
在源码编译安装 mmseg 的时候会报错
解压安装
cd /lamp
tar -zxvf coreseek-3.2.14.tar.gz
进入到 mmseg所在文件夹,先安装中文分词mmseg
cd /lamp/coreseek-3.2.14/mmseg-3.2.14/
./configure --prefix=/usr/local/mmseg
编译过程中报了一个 config.status: error: cannot find input file: src/Makefile.in这个的错误,然后运行下列指令后再次configure就能通过了:
automake
然后再进行编译和安装:
make && make install
然后运行 mmseg,就能输入安装成功的信息了:/usr/local/mmseg/bin/mmseg
输入automake 命令可能也没有用,在 mmseg 里面 有 bootstrap 命令用来检测安装环境并且自动修复,执行这个命令。
如果这个方法不行就执行下面这些命令,再重新编译
aclocal
libtoolize --force
automake --add-missing
autoconf
autoheader
make clean
安装sphinx
接下来,我们要把 Sphinx和mmseg结合起来
(1)、检测安装
进入 coreseek 目录,进行安装
cd /lamp/coreseek-3.2.14/csft-3.2.14/
./configure --prefix=/usr/local/coreseek --with-mysql=/usr/local/mysql --with-mmseg=/usr/local/mmseg --with-mmseg-includes=/usr/local/mmseg/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg/lib/
make && make install
/usr/local/sphinx/src/sphinx.cpp:15557:undefined reference to `libiconv_open’
libsphinx.a(sphinx.o)(.text+0x53a01):/usr/local/sphinx/src/sphinx.cpp:15575:undefined
reference to `libiconv’
libsphinx.a(sphinx.o)(.text+0x53a28):/usr/local/sphinx/src/sphinx.cpp:15581:undefined
reference to `libiconv_close’
collect2: ld returned 1 exit status
make[2]: * [indexer] Error 1
make[2]: Leaving directory `/usr/local/sphinx/src’
make[1]: * [all] Error 2
make[1]: Leaving directory `/usr/local/sphinx/src’
make: * [all-recursive] Error 1
官网解决办法:
In the meantime I’ve change theconfiguration file and set#define USE_LIBICONV 0 in line 8179.
修改 configure 文件把 #define USE_LIBICONV 0 最后的数值由1改为0
重新编译。