sphinx --- 安装中碰到的问题

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

接下来,我们要把 Sphinxmmseg结合起来
(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

同样遇到报错的时候 csft-3.2.14 里面的  buildconf.sh


/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
重新编译。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值