centos 7 coreseek-4.1-beta服务安装遇到的coreseek编译问题以及解决方法

安装过程错误如下:

错误1

centOS7上安装4.1版本,执行 sh buildconf.sh  未生成configure

 

automake: warnings are treated as errors

/usr/share/automake-1.13/am/library.am: warning: 'libstemmer.a': linking libraries using a non-POSIX

/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'

libstemmer_c/Makefile.am:2:   while processing library 'libstemmer.a'

/usr/share/automake-1.13/am/library.am: warning: 'libsphinx.a': linking libraries using a non-POSIX

/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'

src/Makefile.am:14:   while processing library ‘libsphinx.a'

总体意思是: archiver requires 'AM_PROG_AR' in 'configure.ac'

解决办法:在 csft-4.1/configure.ac 文件中,查找:

AC_PROG_RANLIB 

后面加上

AM_PROG_AR 

最终格式为:AC_PROG_RANLIB AM_PROG_AR

再次执行 sh buildconf.sh

 

错误2

'automake --add-missing' can install 'ar-lib'

在命令行执行

#automake --add-missing

再次执行 sh buildconf.sh

 

错误3

编译的时候出现

sphinxexpr.cpp:1823:43: error: ‘ExprEval’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

   T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage

处理办法:

 #vim /usr/local/src/coreseek-4.1-beta/csft-4.1/src/sphinxexpr.cpp

 1746                  T val = ExprEval ( this->m_pArg, tMatch );

 形式修改为  T val = this->ExprEval ( this->m_pArg, tMatch );

 1777                  T val = ExprEval ( this->m_pArg, tMatch );

 形式修改为  T val = this->ExprEval ( this->m_pArg, tMatch );

 1823                  T val = ExprEval ( this->m_pArg, tMatch );

 形式修改为  T val = this->ExprEval ( this->m_pArg, tMatch );

 错误4

 In file included from sphinxstd.cpp:24:0:

py_layer.h:16:27: fatal error: Python.h: No such file or directory

  #include   <Python.h>  

  这是由于缺少了python环境的devel支持包

  解决办法:yum install python-devel

 

启动服务及测试

cd ../testpack/

##如要启动搜索服务,请使用

/usr/local/coreseek/bin/searchd -c etc/csft.conf(注意-c后面是相对路径)

##如要停止搜索服务,请使用

/usr/local/coreseek/bin/searchd -c etc/csft.conf --stop

 

/usr/local/src/coreseek-3.2.14/testpack/etc/pysource

支持python选项,会有一个

posted @ 2017-06-15 17:40  JesseLucky  阅读(484)  评论(0)    收藏  举报