Linux coreseek开源中文检索引擎-Sphinx中文版安装

下载并解压coreseek


cd /usr/local/src


wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz


tar zxvf coreseek-4.1-beta.tar.gz



安装词库

yum -y install expat expat-devel python python-devel


cd coreseek-4.1-beta


cd mmseg-3.2.14


./bootstrap


./configure --prefix=/usr/local/mmseg3


make && make install



遇到的问题及解决方案:


问题:


error: cannot find input file: src/Makefile.in



解决方案:


aclocal


libtoolize --force


automake --add-missing


autoconf


autoheader


make clean



运行aclocal时出错的解决方案:


错误:


configure.in:26: warning: macro `AM_PROG_LIBTOOL' not found in library



解决方案:


yum -y install libtool



安装coreseek



cd ../csft-4.1


sh buildconf.sh


./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 --with-python


export LIBS="-liconv"


make && make install


问题1:

/usr/local/src/coreseek-4.1-beta/csft-4.1/src/sphinx.cpp:22292: undefined reference to `libiconv_open'

/usr/local/src/coreseek-4.1-beta/csft-4.1/src/sphinx.cpp:22310: undefined reference to `libiconv'

/usr/local/src/coreseek-4.1-beta/csft-4.1/src/sphinx.cpp:22316: undefined reference to `libiconv_close'

collect2: ld 返回 1

make[2]: *** [indexer] 错误 1

make[2]: Leaving directory `/mnt/usr/local/src/coreseek-4.1-beta/csft-4.1/src'

make[1]: *** [all] 错误 2

make[1]: Leaving directory `/mnt/usr/local/src/coreseek-4.1-beta/csft-4.1/src'

make: *** [all-recursive] 错误 1

 
 

解决方法:

## 如果出现undefined reference to `libiconv'的类似错误,可以按照如下方法处理:

##方法一:(Linux使用) ## 直接执行:export LIBS="-liconv" ##然后make clean,再次configure后,进行编译安装make && make install


## 方法二:

## 首先configure,然后vim src/Makefile ## 在其中搜索lexpat,在其后加上 -liconv ## 修改后该行应该为:-lexpat -liconv -L/usr/local/lib ## 然后再次make && make install


## 方法三:

## 首先configure,然后vim config/config.h ## 在其中搜索USE_LIBICONV,将其后的1修改为0 ## 然后再次make && make install


以下用来测试是否正确


cd /usr/local/src/coreseek-4.1-beta/testpack


cat var/test/test.xml


/usr/local/mmseg3/bin/mmseg -d /usr/local/mmseg3/etc var/test/test.xml


/usr/local/coreseek/bin/indexer -c /usr/local/src/coreseek-4.1-beta/testpack/etc/csft.conf --all


/usr/local/coreseek/bin/search -c etc/csft.conf 网络搜索



你可能感兴趣的:(python,warning,cannot)