coreseek 官网上有很详细的安装过程,我这里就很少说了。我来讲说遇到的一些坑和解决方式mysql
./configure --prefix=/usr/local/mmseg3
执行后会报错 error: cannot find input file: src/Makefile.insql
这个是须要安装 automakebash
而后执行this
aclocal libtoolize --force automake --add-missing autoconf autoheader make clean
以上代码若是执行报错,通常是没有安装相应软件,根据提示安装便可lua
./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
执行以上代码会报错 “ERROR: cannot find MySQL include files.......To disable MySQL support, use --without-mysql option."spa
解决方式: unix
##请找到头文件mysql.h所在的目录,通常是/usr/local/mysql/include,请替换为实际的 ##请找到库文件libmysqlclient.a所在的目录,通常是/usr/local/mysql/lib,请替换为实际 ##configure参数加上:--with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib,执行后,从新编译安装
make csft的时候报错 缘由是Ubuntu下的csft须要打补丁 code
--- src/sphinxexpr.cpp.org 2011-10-07 20:08:58.000000000 +0800 +++ src/sphinxexpr.cpp 2012-09-07 19:58:01.000000000 +0800 @@ -1743,7 +1743,7 @@ /// evaluate arg, return interval id virtual int IntEval ( const CSphMatch & tMatch ) const { - T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage + T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage ARRAY_FOREACH ( i, this->m_dValues ) // FIXME! OPTIMIZE! perform binary search here if ( val<this->m_dValues[i] ) return i; @@ -1774,7 +1774,7 @@ /// evaluate arg, return interval id virtual int IntEval ( const CSphMatch & tMatch ) const { - T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage + T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage ARRAY_FOREACH ( i, m_dTurnPoints ) if ( val < Expr_ArgVsSet_c<T>::ExprEval ( m_dTurnPoints[i], tMatch ) ) return i; @@ -1820,7 +1820,7 @@ /// evaluate arg, check if the value is within set virtual int IntEval ( const CSphMatch & tMatch ) const { - T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage + T val = this->ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage return this->m_dValues.BinarySearch ( val )!=NULL; }
将以上代码保存为 sphinxexpr.cpp-csft-4.1-beta.patchorm
而后执行:blog
patch -p1 < sphinxexpr.cpp-csft-4.1-beta.patch