coreseek4.1_beta安装error解决办法

安装参考:

https://www.cnblogs.com/mingaixin/p/5013131.html

其他错误参考:

https://www.cnblogs.com/mingaixin/p/5013356.html

https://www.cnblogs.com/mingaixin/p/5013191.html

安装配置:

./configure --prefix=/usr/local/coreseek4  --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.


Check that you do have MySQL include files installed.

The package name is typically 'mysql-devel'.


If include files are installed on your system, but you are still getting

this message, you should do one of the following:


1) either specify includes location explicitly, using --with-mysql-includes;

2) or specify MySQL installation root location explicitly, using --with-mysql;

3) or make sure that the path to 'mysql_config' program is listed in

   your PATH environment variable.


解决办法:

apt install libmariadbclient-dev(如果安装mariadb)或者apt install mysql-devel(如果安装mysql)


编译时报错:

sphinx.cpp:3446:10: warning: initialization of pointer of type ‘BYTE *’



  1. sphinx.cpp 3446行,修改返回值为nullptr。

        

  2. sphinxsort.cpp中,找到

    #define LOC_CHECK(cond,msg) if (!(_cond)) { sError = "invalid schema: " _msg; return false; }

    这个宏定义,返回值改成nullptr。

  3. py_layer.cpp,还是LOC_CHECK宏定义,返回值改成nullptr。发现在这个原文件里很多用bool的false作对象指针的返回值,这是c++03的语法,现在已经无法通过编译。所以多次编译,修改所有的这些语法错误,返回值都改成nullptr。

  4. 最后indexer.cpp的SpawnSourceXMLPipe方法,宏定义替换掉。方法上面介绍过。

    indexer.cpp:665:9: error: cannot convert ‘bool’ to ‘CSphSource*’ in return

          return true;

        找到 bool * SqlParamsConfigure 函数修改成 CSphSource * SqlParamsConfigure,同时将函数内所有return false改成:

return nullptr,最后的返回return true;注释





白俊遥博客
请先登录后发表评论
  • 最新评论
  • 总共0条评论