【问题标题】:"fatal error: TProcessor.h: No such file or directory" when trying to install Rhbase package尝试安装 Rhbase 包时出现“致命错误:TProcessor.h:没有这样的文件或目录”
【发布时间】:2016-05-04 07:43:34
【问题描述】:
大家,
我正在尝试安装 Rhbase 包,但首先我缺少 thrift 包,我解决了这个问题,但现在它显示了另一个错误。我将 TProcessor.h 添加到 ../lib/cpp/src/thrift/processor/ 中,但没有帮助,它显示了同样的错误:
In file included from Hbase.cpp:7:0:
Hbase.h:10:24: fatal error: TProcessor.h: No such file or directory
#include <TProcessor.h>
^
compilation terminated.
make: *** [Hbase.o] Error 1
ERROR: compilation failed for package ‘rhbase’
我正在使用 RStudio
非常感谢
【问题讨论】:
标签:
ubuntu
hbase
rstudio
rhadoop
【解决方案1】:
检查你的 threft.pc 文件在哪里
pkg-config --cflags thrift
如果它在therft目录中使用这个命令移动
cd /usr/local/lib/pkgconfig
sudo perl -pi -e 's{(^includedir=.*/include$)}{$1/thrift}' thrift.pc
sudo perl -pi -e 's{(^Cflags:.*)}{$1 -std=c++11}' thrift.pc
并查找您的thrift是否在此目录中。
pkg-config --cflags thrift
-std=c++11 -I/usr/local/Cellar/thrift/0.9.2/include/thrift
或根据您的系统配置在某个相关目录中。
【解决方案2】:
您应该编辑thrift.pc。
我使用locate thrift.pc 并在/usr/local/lib/pkgconfig/ 中找到它。
然后我对其进行了编辑,使includedir 变量看起来像
includedir=${prefix}/include/thrift
它对我有用。