热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

coreseek安装日志

coreseek安装日志--Linux发行版技术-Debian信息,下面是详情阅读。
在windows下使用过很多次coreseek了,但是还没在linux下安装过他,今天特意在Debian先安装体验了一把,过程如下:

下载mmseg

wget -O "mmseg-0.7.3.tar.gz" "http://www.coreseek.com/uploads/sources/mmseg-0.7.3.tar.gz"

下载coreseek1.5.2

wget -O "coreseek_fulltext_2.5.2.tar.gz" "http://www.coreseek.com/uploads/sources/coreseek_fulltext_2.5.2.tar.gz"

解压缩两个文件包

tar -xzvf mmseg-0.7.3.tar.gz
tar -xzvf coreseek_fulltext_2.5.2.tar.gz

编译mmseg

cd mmseg-0.7.3
./configure --prefix=/usr/local/mmseg
make
make install

编译coreseek

cd coreseek_fulltext_2.5.source/

到这里都一切正常;下面就开始麻烦了

第一configure

./configure --prefix=/usr/local/coreseek --with-python --with-mysql --with-mmseg-includes=/usr/local/mmseg/include/ --with-mmseg-libs=/usr/local/mmseg/lib/
make

结果提示错误

tokenizer_zhcn.cpp:1:30: error: SegmenterManager.h: No such file or directory
tokenizer_zhcn.cpp:2:23: error: Segmenter.h: No such file or directory
tokenizer_zhcn.cpp:15: error: expected initializer before '<' token
tokenizer_zhcn.cpp:43: error: 'css' has not been declared
tokenizer_zhcn.cpp:43: error: ISO C++ forbids declaration of 'Segmenter' with no type
tokenizer_zhcn.cpp:43: error: expected ';' before '*' token
tokenizer_zhcn.cpp:55: error: expected `;' before 'iconv_t'
tokenizer_zhcn.cpp:89: error: 'css' has not been declared
tokenizer_zhcn.cpp:89: error: ISO C++ forbids declaration of 'ToLowerImpl' with no type
tokenizer_zhcn.cpp:89: error: expected ';' before '*' token
tokenizer_zhcn.cpp:90: error: 'css' has not been declared
tokenizer_zhcn.cpp:90: error: ISO C++ forbids declaration of 'ChineseCharTaggerImpl' with no type
tokenizer_zhcn.cpp:90: error: expected ';' before '*' token
tokenizer_zhcn.cpp:92: error: 'css' has not been declared
tokenizer_zhcn.cpp:92: error: ISO C++ forbids declaration of 'Segmenter' with no type
tokenizer_zhcn.cpp:92: error: expected ';' before '*' token
tokenizer_zhcn.cpp:93: error: 'css' has not been declared
tokenizer_zhcn.cpp:93: error: ISO C++ forbids declaration of 'SegmenterManager' with no type
tokenizer_zhcn.cpp:93: error: expected ';' before '*' token
tokenizer_zhcn.cpp: In constructor 'CSphTokenizer_zh_CN_UTF8_Private::CSphTokenizer_zh_CN_UTF8_Private()':
tokenizer_zhcn.cpp:21: error: class 'CSphTokenizer_zh_CN_UTF8_Private' does not have any field named 'm_seg'
tokenizer_zhcn.cpp:21: error: class 'CSphTokenizer_zh_CN_UTF8_Private' does not have any field named 'm_mgr'
tokenizer_zhcn.cpp:26: error: 'm_lower' was not declared in this scope
tokenizer_zhcn.cpp:27: error: 'css' has not been declared
tokenizer_zhcn.cpp:28: error: 'm_tagger' was not declared in this scope
tokenizer_zhcn.cpp:29: error: 'css' has not been declared
tokenizer_zhcn.cpp: At global scope:
tokenizer_zhcn.cpp:100: error: 'css' has not been declared
tokenizer_zhcn.cpp:100: error: expected constructor, destructor, or type conversion before '*' token
tokenizer_zhcn.cpp:101: error: 'css' has not been declared
tokenizer_zhcn.cpp:101: error: expected constructor, destructor, or type conversion before '*' token
tokenizer_zhcn.cpp: In member function 'virtual void CSphTokenizer_zh_CN_UTF8::SetBuffer(BYTE*, int)':
tokenizer_zhcn.cpp:134: error: 'css' has not been declared
tokenizer_zhcn.cpp:134: error: 'seg' was not declared in this scope
tokenizer_zhcn.cpp:134: error: 'class CSphTokenizer_zh_CN_UTF8_Private' has no member named 'GetSegmenter'
tokenizer_zhcn.cpp:135: error: 'u1' was not declared in this scope
tokenizer_zhcn.cpp:135: error: expected primary-expression before ')' token
tokenizer_zhcn.cpp: In member function 'virtual BYTE* CSphTokenizer_zh_CN_UTF8::GetToken()':
tokenizer_zhcn.cpp:152: error: 'css' has not been declared
tokenizer_zhcn.cpp:152: error: 'seg' was not declared in this scope
tokenizer_zhcn.cpp:152: error: 'class CSphTokenizer_zh_CN_UTF8_Private' has no member named 'GetSegmenter'
tokenizer_zhcn.cpp:154: error: 'u2' was not declared in this scope
tokenizer_zhcn.cpp:154: error: expected `;' before 'len'
tokenizer_zhcn.cpp:158: error: 'len' was not declared in this scope
tokenizer_zhcn.cpp:158: error: 'symlen' was not declared in this scope
tokenizer_zhcn.cpp:162: error: 'len' was not declared in this scope
tokenizer_zhcn.cpp:167: error: 'symlen' was not declared in this scope
tokenizer_zhcn.cpp:180: error: 'class CSphTokenizer_zh_CN_UTF8_Private' has no member named 'm_lower'
tokenizer_zhcn.cpp:180: error: expected primary-expression before 'int'
tokenizer_zhcn.cpp:180: error: expected `)' before 'int'
tokenizer_zhcn.cpp:199: error: expected `;' before 'tag'
tokenizer_zhcn.cpp:200: error: 'tag' was not declared in this scope

经请教coreseek作者后发现,问题出在mmseg头文件包含不正确;

因此使用下面参数configure

./configure --prefix=/usr/local/coreseek --with-python --with-mysql --with-mmseg-includes=/usr/local/mmseg/include/mmseg --with-mmseg-libs=/usr/local/mmseg/lib/

结果还是报错,错误提示为:

In file included from pydatasource.cpp:13:
pydatasource.h:11:26: error: Python.h: No such file or directory
pydatasource.h:65: error: 'PyObject' has not been declared
pydatasource.h:67: error: ISO C++ forbids declaration of 'PyObject' with no type
pydatasource.h:67: error: expected ';' before '*' token
pydatasource.h:68: error: ISO C++ forbids declaration of 'PyObject' with no type
pydatasource.h:68: error: expected ';' before '*' token
pydatasource.h:69: error: ISO C++ forbids declaration of 'PyObject' with no type
pydatasource.h:69: error: expected ';' before '*' token
pydatasource.h:70: error: ISO C++ forbids declaration of 'PyObject' with no type
pydatasource.h:70: error: expected ';' before '*' token
pydatasource.cpp:17: error: 'PyObject' was not declared in this scope
pydatasource.cpp:17: error: 'pMain' was not declared in this scope
pydatasource.cpp:17: error: expected primary-expression before '&' token
pydatasource.cpp:17: error: 'datasource_list' was not declared in this scope
pydatasource.cpp:17: error: initializer expression list treated as compound expression
pydatasource.cpp: In constructor 'CSphSource_Python::CSphSource_Python(const char*)':
pydatasource.cpp:23: error: 'main_module' was not declared in this scope
pydatasource.cpp:24: error: 'builtin_module' was not declared in this scope
pydatasource.cpp:25: error: 'time_module' was not declared in this scope
pydatasource.cpp:26: error: 'm_pInstance' was not declared in this scope
pydatasource.cpp: In destructor 'virtual CSphSource_Python::~CSphSource_Python()':
pydatasource.cpp:34: error: 'm_pInstance' was not declared in this scope
pydatasource.cpp:35: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp: In member function 'bool CSphSource_Python::Setup(const CSphConfigSection&, const char*)':
pydatasource.cpp:44: error: 'Py_IsInitialized' was not declared in this scope
pydatasource.cpp:45: error: 'Py_Initialize' was not declared in this scope
pydatasource.cpp:58: error: 'PyErr_Print' was not declared in this scope
pydatasource.cpp:59: error: 'PyErr_Clear' was not declared in this scope
pydatasource.cpp:63: error: 'main_module' was not declared in this scope
pydatasource.cpp:63: error: 'PyImport_AddModule' was not declared in this scope
pydatasource.cpp:64: error: 'builtin_module' was not declared in this scope
pydatasource.cpp:65: error: 'time_module' was not declared in this scope
pydatasource.cpp:73: error: 'FindDatasource' cannot be used as a function
pydatasource.cpp: In static member function 'static void CSphSource_Python::CleanUp()':
pydatasource.cpp:100: error: 'Py_IsInitialized' was not declared in this scope
pydatasource.cpp:106: error: 'Py_Finalize' was not declared in this scope
pydatasource.cpp: In member function 'virtual bool CSphSource_Python::Connect(CSphString&)':
pydatasource.cpp:121: error: 'm_pInstance' was not declared in this scope
pydatasource.cpp:128: error: 'PyObject' was not declared in this scope
pydatasource.cpp:128: error: 'pList' was not declared in this scope
pydatasource.cpp:128: error: 'm_pInstance' was not declared in this scope
pydatasource.cpp:128: error: 'PyObject_Dir' was not declared in this scope
pydatasource.cpp:131: error: 'PyErr_Print' was not declared in this scope
pydatasource.cpp:134: error: 'PyList_Check' was not declared in this scope
pydatasource.cpp:136: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp:141: error: 'PyList_Size' was not declared in this scope
pydatasource.cpp:144: error: 'item' was not declared in this scope
pydatasource.cpp:144: error: 'PyList_GetItem' was not declared in this scope
pydatasource.cpp:145: error: 'item_str' was not declared in this scope
pydatasource.cpp:145: error: 'PyObject_Str' was not declared in this scope
pydatasource.cpp:147: error: 'PyString_AsString' was not declared in this scope
pydatasource.cpp:151: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp:153: error: 'PyObject_GetAttrString' was not declared in this scope
pydatasource.cpp:160: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp:165: error: 'PyErr_Clear' was not declared in this scope
pydatasource.cpp:170: error: 'item' was not declared in this scope
pydatasource.cpp:170: error: 'PyList_GetItem' was not declared in this scope
pydatasource.cpp:171: error: 'item_str' was not declared in this scope
pydatasource.cpp:171: error: 'PyObject_Str' was not declared in this scope
pydatasource.cpp:172: error: 'PyString_AsString' was not declared in this scope
pydatasource.cpp:173: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp:181: error: 'PyObject_GetAttrString' was not declared in this scope
pydatasource.cpp:185: error: 'PyInt_Type' was not declared in this scope
pydatasource.cpp:188: error: 'PyErr_Clear' was not declared in this scope
pydatasource.cpp:196: error: 'PyMethod_Type' was not declared in this scope
pydatasource.cpp:200: error: 'PyFloat_Type' was not declared in this scope
pydatasource.cpp:207: error: 'PyInt_Type' was not declared in this scope
pydatasource.cpp:215: error: 'PyList_Type' was not declared in this scope
pydatasource.cpp:224: error: 'PyBool_Type' was not declared in this scope
pydatasource.cpp:231: error: 'PyString_Type' was not declared in this scope
pydatasource.cpp:237: error: 'timeFunc' was not declared in this scope
pydatasource.cpp:237: error: 'time_module' was not declared in this scope
pydatasource.cpp:255: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp:261: error: 'm_pInstance' was not declared in this scope
pydatasource.cpp:263: error: 'PyErr_Print' was not declared in this scope
pydatasource.cpp:266: error: 'PyObject' was not declared in this scope
pydatasource.cpp:266: error: 'pArgs' was not declared in this scope
pydatasource.cpp:267: error: 'pResult' was not declared in this scope
pydatasource.cpp:268: error: 'pFunc' was not declared in this scope
pydatasource.cpp:268: error: 'PyObject_GetAttrString' was not declared in this scope
pydatasource.cpp:271: error: 'PyErr_Clear' was not declared in this scope
pydatasource.cpp:275: error: 'PyCallable_Check' was not declared in this scope
pydatasource.cpp:276: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp:279: error: 'Py_BuildValue' was not declared in this scope
pydatasource.cpp:281: error: 'PyEval_CallObject' was not declared in this scope
pydatasource.cpp:282: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp: At global scope:
pydatasource.cpp:294: error: 'bool CSphSource_Python::CheckResult' is not a static member of 'class CSphSource_Python'
pydatasource.cpp:294: error: 'PyObject' was not declared in this scope
pydatasource.cpp:294: error: 'pResult' was not declared in this scope
pydatasource.cpp:295: error: expected ',' or ';' before '{' token
pydatasource.cpp: In member function 'virtual void CSphSource_Python::PostIndex()':
pydatasource.cpp:322: error: 'm_pInstance' was not declared in this scope
pydatasource.cpp:324: error: 'PyErr_Print' was not declared in this scope
pydatasource.cpp:327: error: 'PyObject' was not declared in this scope
pydatasource.cpp:327: error: 'pArgs' was not declared in this scope
pydatasource.cpp:328: error: 'pResult' was not declared in this scope
pydatasource.cpp:329: error: 'pFunc' was not declared in this scope
pydatasource.cpp:329: error: 'PyObject_GetAttrString' was not declared in this scope
pydatasource.cpp:331: error: 'PyErr_Clear' was not declared in this scope
pydatasource.cpp:333: error: 'PyCallable_Check' was not declared in this scope
pydatasource.cpp:334: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp:337: error: 'Py_BuildValue' was not declared in this scope
pydatasource.cpp:339: error: 'PyEval_CallObject' was not declared in this scope
pydatasource.cpp:340: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp: In member function 'virtual bool CSphSource_Python::IterateHitsStart(CSphString&)':
pydatasource.cpp:353: error: 'm_pInstance' was not declared in this scope
pydatasource.cpp:355: error: 'PyErr_Print' was not declared in this scope
pydatasource.cpp:358: error: 'PyObject' was not declared in this scope
pydatasource.cpp:358: error: 'pArgs' was not declared in this scope
pydatasource.cpp:359: error: 'pResult' was not declared in this scope
pydatasource.cpp:360: error: 'pFunc' was not declared in this scope
pydatasource.cpp:360: error: 'PyObject_GetAttrString' was not declared in this scope
pydatasource.cpp:362: error: 'PyErr_Clear' was not declared in this scope
pydatasource.cpp:364: error: 'PyCallable_Check' was not declared in this scope
pydatasource.cpp:365: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp:368: error: 'Py_BuildValue' was not declared in this scope
pydatasource.cpp:370: error: 'PyEval_CallObject' was not declared in this scope
pydatasource.cpp:371: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp: In member function 'virtual BYTE** CSphSource_Python::NextDocument(CSphString&)':
pydatasource.cpp:448: error: 'm_pInstance' was not declared in this scope
pydatasource.cpp:450: error: 'PyErr_Print' was not declared in this scope
pydatasource.cpp:453: error: 'PyObject' was not declared in this scope
pydatasource.cpp:453: error: 'pArgs' was not declared in this scope
pydatasource.cpp:454: error: 'pResult' was not declared in this scope
pydatasource.cpp:455: error: 'pFunc' was not declared in this scope
pydatasource.cpp:455: error: 'PyObject_GetAttrString' was not declared in this scope
pydatasource.cpp:459: error: 'PyCallable_Check' was not declared in this scope
pydatasource.cpp:460: error: 'Py_XDECREF' was not declared in this scope
pydatasource.cpp:463: error: 'Py_BuildValue' was not declared in this scope
pydatasource.cpp:465: error: 'PyEval_CallObject' was not declared in this scope
pydatasource.cpp:466: error: 'Py_XDECRE

检查发现无python-dev包;安装此包

apt-get install python-dev

继续编译coreseek

./configure --prefix=/usr/local/coreseek --with-python --with-mysql --with-mmseg-includes=/usr/local/mmseg/include/mmseg --with-mmseg-libs=/usr/local/mmseg/lib/
make
make install

一个小心得,如果make文件失败后更改configure参数后继续make出错可以尝试下make clean;清除掉之前的make的文件再次make。
推荐阅读
  • 搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的详细步骤
    本文详细介绍了搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的步骤,包括环境说明、相关软件下载的地址以及所需的插件下载地址。 ... [详细]
  • 本文介绍了在Hibernate配置lazy=false时无法加载数据的问题,通过采用OpenSessionInView模式和修改数据库服务器版本解决了该问题。详细描述了问题的出现和解决过程,包括运行环境和数据库的配置信息。 ... [详细]
  • Metasploit攻击渗透实践
    本文介绍了Metasploit攻击渗透实践的内容和要求,包括主动攻击、针对浏览器和客户端的攻击,以及成功应用辅助模块的实践过程。其中涉及使用Hydra在不知道密码的情况下攻击metsploit2靶机获取密码,以及攻击浏览器中的tomcat服务的具体步骤。同时还讲解了爆破密码的方法和设置攻击目标主机的相关参数。 ... [详细]
  • Android源码深入理解JNI技术的概述和应用
    本文介绍了Android源码中的JNI技术,包括概述和应用。JNI是Java Native Interface的缩写,是一种技术,可以实现Java程序调用Native语言写的函数,以及Native程序调用Java层的函数。在Android平台上,JNI充当了连接Java世界和Native世界的桥梁。本文通过分析Android源码中的相关文件和位置,深入探讨了JNI技术在Android开发中的重要性和应用场景。 ... [详细]
  • 原文地址http://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/最开始时 ... [详细]
  • 如何查看电脑系统版本_腾讯云服务器系统版本怎么看?Windows和Centos版本怎么选?...
    腾讯云服务器系统版本怎么看?想要知道自己的腾讯云服务器系统版本是哪个,可以登录云服务器后台管理系统查看,或者使用命令行查询,如果不会操作& ... [详细]
  • Ubuntu 9.04中安装谷歌Chromium浏览器及使用体验[图文]
    nsitionalENhttp:www.w3.orgTRxhtml1DTDxhtml1-transitional.dtd ... [详细]
  • 如何在服务器主机上实现文件共享的方法和工具
    本文介绍了在服务器主机上实现文件共享的方法和工具,包括Linux主机和Windows主机的文件传输方式,Web运维和FTP/SFTP客户端运维两种方式,以及使用WinSCP工具将文件上传至Linux云服务器的操作方法。此外,还介绍了在迁移过程中需要安装迁移Agent并输入目的端服务器所在华为云的AK/SK,以及主机迁移服务会收集的源端服务器信息。 ... [详细]
  • 本文讨论了在数据库打开和关闭状态下,重新命名或移动数据文件和日志文件的情况。针对性能和维护原因,需要将数据库文件移动到不同的磁盘上或重新分配到新的磁盘上的情况,以及在操作系统级别移动或重命名数据文件但未在数据库层进行重命名导致报错的情况。通过三个方面进行讨论。 ... [详细]
  • CentOS7.8下编译muduo库找不到Boost库报错的解决方法
    本文介绍了在CentOS7.8下编译muduo库时出现找不到Boost库报错的问题,并提供了解决方法。文章详细介绍了从Github上下载muduo和muduo-tutorial源代码的步骤,并指导如何编译muduo库。最后,作者提供了陈硕老师的Github链接和muduo库的简介。 ... [详细]
  • Kali Linux 简介
    KaliLinux是世界渗透测试行业公认的优秀的网络安全审计工具集合,它可以通过对设备的探测来审计其安全性,而且功能完备,几乎包含了目前所 ... [详细]
  • systemd-nspawn可以创建最轻量级的容器(ns的意思就是namespace),本文的实验平台是Ubuntu16.04,x86_64机器。本文的目的是:在Ubuntu中用syst ... [详细]
  • 如何将CentOS8转换为CentOSStream
    CentOS Stream是一个持续交付的Linux发行版,它在RHEL之前处于领先地位。它将具有滚动发布,即不断进行更改。CentOS将成为一个上游版本,它将具有测试补丁和更新。 ... [详细]
  • Linux神奇漏洞:长按回车键70秒 即可轻松拿到Root权限
    一般来说获取系统root权限是很困难的,尤其是加密系统中,但西班牙安全研究员hectormarco、ismaelripoll发现,linux系统下只需按住回车键70秒钟,就能轻 ... [详细]
  • python3.7 安装pip3_python3的pip3安装
    ---恢复内容开始---pip3的安装需要对应一整套python的编译工具库,所以安装好的pip3是这个样子:inearAi:~$pip3-Vpi ... [详细]
author-avatar
吖鸟集团总公司
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有