Ubuntu 14.04 安装coreseek-3.2.14的那些坑

 coreseek 官网上有很详细的安装过程,我这里就不多说了。我来说说遇到的一些坑和解决方式

坑1:  
./configure --prefix=/usr/local/mmseg3

执行后会报错 error: cannot find input file: src/Makefile.in

这个是需要安装 automake

然后执行

aclocal
libtoolize --force  
automake --add-missing
autoconf  
autoheader  
make clean

以上代码如果执行报错,一般是没有安装相应软件,根据提示安装即可

 

坑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."

解决方式:  

##请找到头文件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需要打补丁 

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

然后执行:

patch -p1 < sphinxexpr.cpp-csft-4.1-beta.patch

 

 

转载于:https://www.cnblogs.com/unfindable/p/5308841.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值