Ubuntu 14.04 安裝coreseek-3.2.14的那些坑

 coreseek 官網上有很詳細的安裝過程,我這裏就很少說了。我來講說遇到的一些坑和解決方式mysql

坑1:  

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

 

坑2:

./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,執行後,從新編譯安裝

坑3:

 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
相關文章
相關標籤/搜索