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

csft安装过程中出错的问题及解决办法(目前仍然无法成功进行对中文的处理)...

1.安装mmesgwgethttp:www.coreseek.cnuploadscsft3.1Sourcemmseg-3.1.tar.gz#.configure--prefixus

1 . 安装mmesg

 wget http://www.coreseek.cn/uploads/csft/3.1/Source/mmseg-3.1.tar.gz
 # ./configure --prefix=/usr/local/mmseg && make && make install   

2 . 安装PYTHON2.5
  wget http://www.python.org/ftp/python/2.5/Python-2.5.tar.bz2
  ./configure 
3 . 设置环境变量
# cd -
# vim .profile

增加两行
export CPPFLAGS=-I/usr/local/include/python2.5
export LDFLAGS=-lpython2.5

4. 安装csft
   wget http://www.coreseek.cn/uploads/csft/3.1/Source/csft-3.1.tar.gzhttp://www.coreseek.cn/uploads/csft/3.1/Source/csft-3.1.tar.gz

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



You have new mail in /var/spool/mail/zz




$make
Making all in src
make[1]: Entering directory `/home/zyf/zyfwork/csft3.1b3/src'
if test -d ../.svn; then svn info .. --xml | perl svnxrev.pl; fi;
make  all-am
make[2]: Entering directory `/home/zyf/zyfwork/csft3.1b3/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I../config  -DSYSCONFDIR="\"/usr/local/webserver/csft/etc\"" -I/usr/local/include -pthread -I/usr/local/webserver/mysql/include/mysql -DUNIV_LINUX  -I/usr/local/include/mmseg   -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT tokenizer_zhcn.o -MD -MP -MF ".deps/tokenizer_zhcn.Tpo" -c -o tokenizer_zhcn.o tokenizer_zhcn.cpp; \
then mv -f ".deps/tokenizer_zhcn.Tpo" ".deps/tokenizer_zhcn.Po"; else rm -f ".deps/tokenizer_zhcn.Tpo"; exit 1; fi
In file included from /usr/local/include/mmseg/Segmenter.h:38,
                 from /usr/local/include/mmseg/SegmenterManager.h:32,
                 from tokenizer_zhcn.cpp:1:
/usr/local/include/mmseg/mmthunk.h: In member function `u2 css::ChunkQueue::getToken()':
/usr/local/include/mmseg/mmthunk.h:140: warning: comparison between signed and unsigned integer expressions
/usr/local/include/mmseg/mmthunk.h:157: warning: converting of negative value `-0x000000001' to `size_t'
/usr/local/include/mmseg/mmthunk.h:158: warning: comparison between signed and unsigned integer expressions
tokenizer_zhcn.cpp: In member function `css::Segmenter* CSphTokenizer_zh_CN_UTF8_Private::GetSegmenter(const char*)':
tokenizer_zhcn.cpp:54: error: no matching function for call to `css::SegmenterManager::getSegmenter(bool)'
/usr/local/include/mmseg/SegmenterManager.h:46: note: candidates are: css::Segmenter* css::SegmenterManager::getSegmenter()
tokenizer_zhcn.cpp: In member function `virtual bool CSphTokenizer_zh_CN_UTF8::IsSentenceEnd()':
tokenizer_zhcn.cpp:155: error: 'class css::Segmenter' has no member named 'isSentenceEnd'
tokenizer_zhcn.cpp: In member function `virtual bool CSphTokenizer_zh_CN_UTF8::IsKeyWord(BYTE*, int)':
tokenizer_zhcn.cpp:161: error: 'class css::Segmenter' has no member named 'isKeyWord'
tokenizer_zhcn.cpp: In member function `virtual int CSphTokenizer_zh_CN_UTF8::GetWordWeight(BYTE*, int) const':
tokenizer_zhcn.cpp:167: error: 'class css::Segmenter' has no member named 'getWordWeight'
tokenizer_zhcn.cpp: In member function `virtual BYTE* CSphTokenizer_zh_CN_UTF8::GetToken(int)':
tokenizer_zhcn.cpp:180: error: no matching function for call to `css::Segmenter::peekToken(u2&, u2&, int&)'
/usr/local/include/mmseg/Segmenter.h:110: note: candidates are: const u1* css::Segmenter::peekToken(u2&, u2&)
tokenizer_zhcn.cpp:181: error: no matching function for call to `css::Segmenter::popToken(u2&, int&)'
/usr/local/include/mmseg/Segmenter.h:111: note: candidates are: void css::Segmenter::popToken(u2)
make[2]: *** [tokenizer_zhcn.o] Error 1
make[2]: Leaving directory `/home/zyf/zyfwork/csft3.1b3/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/zyf/zyfwork/csft3.1b3/src'
make: *** [all-recursive] Error 1



/usr/local/sphinx/src/sphinx.cpp:15557: undefined reference to `libiconv_open'
libsphinx.a(sphinx.o)(.text+0x53a01):/usr/local/sphinx/src/sphinx.cpp:15575: undefined
reference to `libiconv'
libsphinx.a(sphinx.o)(.text+0x53a28):/usr/local/sphinx/src/sphinx.cpp:15581: undefined
reference to `libiconv_close'
collect2: ld returned 1 exit status
make[2]: * [indexer] Error 1
make[2]: Leaving directory `/usr/local/sphinx/src'
make[1]: * [all] Error 2
make[1]: Leaving directory `/usr/local/sphinx/src'
make: * [all-recursive] Error 1

官网解决办法:

In the meantime I've change the configuration file and set
#define USE_LIBICONV 0 in line 8179.
修改configure 文件把 #define USE_LIBICONV 0 最后的数值由1改为0
重新编译。

 

我使用的参数如下:
./configure --prefix=/usr/local/coreseek --with-mysql=/opt/lampp --with-mysql-includes=/opt/lampp/include/mysql/ --with-mysql-libs=/opt/lampp/lib/mysql/ --with-mmseg-includes=/usr/local/mmseg/include/mmseg --with-mmseg-libs=/usr/local/mmseg/lib/


编译错误一
make[2]: *** [indexer] Error 1
make[2]: Leaving directory `/www/tmp/csft-3.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/www/tmp/csft-3.1/src'
make: *** [all-recursive] Error 1

解决办法

vi ./src/sphinx.cpp

注释以下代码

#case TOKENIZER_ZHCN_GBK:
#pTokenizer = sphCreateGBKChineseTokenizer
#(tSettings.m_sDictPath.cstr(), tSettings.m_nBest); break;
然后重新编译
make clean

make

make install


错误二,索引出错
[root@localhost csft-3.1]# /usr/local/coreseek/bin/indexer --config /usr/local/coreseek/etc/sphinx.conf --all
/usr/local/coreseek/bin/indexer: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory

解决办法

ln -s /opt/lampp/lib/mysql/libmysqlclient.so.16 /usr/lib/libmysqlclient.so.16

错误三,索引不生成

解决办法,原来是手误,把/usr/local/coreseek/bin/indexer --config /usr/local/coreseek/etc/sphinx.conf --all
写成
/usr/local/coreseek/bin/indexer --config /usr/local/coreseek/etc/sphinx.conf -all

错误四,服务启动报错

[root@localhost coreseek]# ./bin/searchd --config /usr/local/coreseek/etc/sphinx.conf
Coreseek Full Text Server 3.1
Copyright (c) 2006-2008 coreseek.com
using config file '/usr/local/coreseek/etc/sphinx.conf'...
listening on all interfaces, port=3312
iniparser: cannot open /usr/local/coreseek/data/dict/mmseg.ini

解决办法

vi /usr/local/coreseek/data/dict/mmseg.ini

输入以下

[mmseg]
merge_number_and_ascii=1;
number_and_ascii_joint=-;
compress_space=0;
seperate_number_ascii=1;

以上解释如下

/*
merge_number_and_ascii: 字母和数字连续出现是非切分
number_and_ascii_joint:连接数字和字母可用的符号,如'-' '.' 等
compress_space:暂时无效
seperate_number_ascii:是否拆分数字,如 1988 -> 1/x 9/x 8/x 8/x

*/



推荐阅读
  • 基于SSL的mysql服务器的主从架构实现说明:本文选用172.16.22.1作为主服务器,172.16.22.3作为从服务器从服务器的mysql软件版 ... [详细]
  • 本文介绍了如何使用C#制作Java+Mysql+Tomcat环境安装程序,实现一键式安装。通过将JDK、Mysql、Tomcat三者制作成一个安装包,解决了客户在安装软件时的复杂配置和繁琐问题,便于管理软件版本和系统集成。具体步骤包括配置JDK环境变量和安装Mysql服务,其中使用了MySQL Server 5.5社区版和my.ini文件。安装方法为通过命令行将目录转到mysql的bin目录下,执行mysqld --install MySQL5命令。 ... [详细]
  • 安装mysqlclient失败解决办法
    本文介绍了在MAC系统中,使用django使用mysql数据库报错的解决办法。通过源码安装mysqlclient或将mysql_config添加到系统环境变量中,可以解决安装mysqlclient失败的问题。同时,还介绍了查看mysql安装路径和使配置文件生效的方法。 ... [详细]
  • 本文介绍了在rhel5.5操作系统下搭建网关+LAMP+postfix+dhcp的步骤和配置方法。通过配置dhcp自动分配ip、实现外网访问公司网站、内网收发邮件、内网上网以及SNAT转换等功能。详细介绍了安装dhcp和配置相关文件的步骤,并提供了相关的命令和配置示例。 ... [详细]
  • 搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的详细步骤
    本文详细介绍了搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的步骤,包括环境说明、相关软件下载的地址以及所需的插件下载地址。 ... [详细]
  • 本文介绍了5个基本Linux命令行工具的现代化替代品,包括du、top和ncdu。这些替代品在功能上进行了改进,提高了可用性,并且适用于现代化系统。其中,ncdu是du的替代品,它提供了与du类似的结果,但在一个基于curses的交互式界面中,重点关注占用磁盘空间较多的目录。 ... [详细]
  • Linux一键安装web环境全攻略
    摘自阿里云服务器官网,此处一键安装包下载:点此下载安装须知1、此安装包可在阿里云所有Linux系统上部署安装,此安装包包含的软件及版本为& ... [详细]
  • MySQL5.6.40在CentOS764下安装过程 ... [详细]
  • 本文介绍了Redis的基础数据结构string的应用场景,并以面试的形式进行问答讲解,帮助读者更好地理解和应用Redis。同时,描述了一位面试者的心理状态和面试官的行为。 ... [详细]
  • http:my.oschina.netleejun2005blog136820刚看到群里又有同学在说HTTP协议下的Get请求参数长度是有大小限制的,最大不能超过XX ... [详细]
  • 本文介绍了使用cacti监控mssql 2005运行资源情况的操作步骤,包括安装必要的工具和驱动,测试mssql的连接,配置监控脚本等。通过php连接mssql来获取SQL 2005性能计算器的值,实现对mssql的监控。详细的操作步骤和代码请参考附件。 ... [详细]
  • 本文介绍了在CentOS上安装Python2.7.2的详细步骤,包括下载、解压、编译和安装等操作。同时提供了一些注意事项,以及测试安装是否成功的方法。 ... [详细]
  • 在tp5项目中引入ueditor编辑器并实例化后插入图片出现目录创建失败问题在查看网络上各种解决方案之后总结如下:根据官网提示主要是因为图片保存的路径无权限导致,官方文档链接:ht ... [详细]
  • 本文主要介绍关于linux文件描述符设置,centos7设置文件句柄数,centos7查看进程数的知识点,对【Linux之进程数和句柄数】和【linux句柄数含义】有兴趣的朋友可以看下由【东城绝神】投 ... [详细]
  • 对于一般的扩展包,我们一般直接pipinstallxxx即可安装,但是unrar直接安装后,发现并不能通过Python程序实现解压的功能& ... [详细]
author-avatar
Opera2502898747
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有