Scribe安装问题

在进行Scribe安装的时候遇到一些问题,其中大部分是依赖包和版本的问题,下面把安装过程中遇到的问题列举一下。 说明:上一篇中对Scribe的安装,其中安装具体依赖包时的方法可能不同,比如thrift有的版本中的bootstrap.sh,有的版本则直接configure等。 安装Scribe软件依赖关系如下:
编译Scribe出错

因为 thrift 的安装决定了后面的 scribe 的安装,我开始安装 thrift-0.5.0.tar.gz 这个版本的,但在 scribe 的时候会一直报: scribe_server.h:45: error: conflicting return type specified for ‘virtual scribe::thrift::ResultCode scribeHandler::Log(const std::vector >&)’ 这个错误,后来查了一下,说是因为 thrift 的 0.5.0 版本有问题,因此这在里应该选择 thrift-0.4.0.tar.gz 这个版本(可能在后面的版本会修复这个 bug 吧)。


编译Scribe出错

前面所有步骤都完成编译Scribe时,出现错误“file.cpp:248: error: ‘class boost::filesystem3::directory_entry’ has no member named ‘filename’”,核对了一些资料,发现我安装的boost的版本问题,我先前安装的是1.47,后来改为1.4.5问题解决了。


scribe模块import错误

执行scribe模块导入的时候报" from scribe import scribe ImportError: No module named scribe"错误,主要是因为安装过程中把这些Python第三方模块都默认安装到/usr/lib/python2.6下,而系统安装Python目录并非在此(本人的在/usr/local/Python2.6),故需要把此目录下的site-packages移动到/usr/local/lib/python2.6/下。


编译thrift错误

执行./configure时报"./configure: line 21183: syntax error near unexpected token `MONO,' ./configure: line 21183: ` PKG_CHECK_MODULES(MONO, mono >= 1.2.6, have_mono=yes, have_mono=no)'"错误 To resolve this, you'll need to find your pkg.m4 (installed by the pkg-config package) file and copy it to the thrift/aclocal directory. From the top-level thrift directory, you can copy the file by running

$cp /usr/share/aclocal/pkg.m4 aclocal

Finally, re-run ./bootstrap.sh and ./configure. (Note that pkg.m4 is created by the pkg-config tool. If your /usr/share/aclocal directory doesn't contain the pkg.m4 file, you may not have pkg-config installed.)


下面几个安装中可能出现的错误,是从网络上看到,一并罗列一下。  

编译fb303 出错 ‘fb_status’ is not a class or namespace

我是使用boost 1.46有这个问题,使用boost 1.36 就没问题

 

thrift 编译出错

gen-cpp/scribe.cpp: In member function ‘virtual bool scribe::thrift::scribeProcessor::process_fn(apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*, std::string&, int32_t, void*)’: gen-cpp/scribe.cpp:288: error: no matching function for call to ‘scribe::thrift::scribeProcessor::process_fn(apache::thrift::protocol::TProtocol*&,apache::thrift::protocol::TProtocol*&, std::basic_string, std::allocator >&, int32_t&, void*&)’ /usr/local/include/thrift/fb303/FacebookService.h:1239: note: candidates are: virtual bool facebook::fb303::FacebookServiceProcessor::process_fn(apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*, std::string&, int32_t) 

thrift版本问题,thrift 0.6 和 pcting-scribe-2ee14d3 就会报这个错,thrift 0.5编译就过了 还有,每次编译最好make clean后再编  

 

参考文章:http://hi.baidu.com/phps/blog/item/e515d2ca003de95ff31fe793.html

http://wiki.apache.org/thrift/ThriftInstallationWin32

posted @ 2011-10-28 13:28  残夜  阅读(1692)  评论(0编辑  收藏  举报