0

我正在尝试将 Apache HAWQ 安装到我的节点。我参考了 Apache HAWQ wiki 页面(https://cwiki.apache.org/confluence/display/HAWQ/Build+and+Install)并成功完成了所有必需的依赖模块,包括 Hadoop、boost、thrift 等。

下一步是安装 Apache HAWQ,下面是命令。

git clone https://git-wip-us.apache.org/repos/asf/incubator-hawq.git

# The code directory is incubator-hawq.
CODE_BASE=`pwd`/incubator-hawq

cd $CODE_BASE

# Run command to generate makefile.
./configure

make -j8

# Install HAWQ
make install

但是,当我跑步时./configure,我收到错误消息说..

.....
checking for snappy-c.h... yes
checking for library containing snappy_max_compressed_length... -lsnappy
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking thrift/protocol/TBinaryProtocol.h usability... no
checking thrift/protocol/TBinaryProtocol.h presence... no
checking for thrift/protocol/TBinaryProtocol.h... no
configure: error: thrift is required

虽然我使用 安装和编译了 thrift configure && make && make install,但是 shell 命令找不到 thrift 库。

因此,我输入了find \ -name 'TBinaryProtocol.h*'thrift 相关模块的安装位置。我收到了以下消息。

[root@hawq1 incubator-hawq]# find / -name 'TBinaryProtocol.h*'
/usr/local/include/thrift/protocol/TBinaryProtocol.h
/root/Downloads/thrift-0.9.1/lib/cpp/src/thrift/protocol/TBinaryProtocol.h
/root/Downloads/thrift-0.9.1/lib/cocoa/src/protocol/TBinaryProtocol.h
/root/Downloads/hawq/thrift-0.9.1/lib/cpp/src/thrift/protocol/TBinaryProtocol.h
/root/Downloads/hawq/thrift-0.9.1/lib/cocoa/src/protocol/TBinaryProtocol.h

这意味着我有节俭模块,并且我认为它们已正确安装在我的目录中。我按照 Apache wiki 页面建议的说明输入ldconfig -p /root/Downloads/hawq/thrift-0.9.1/lib/.

但我得到了同样的错误。最后我搜索了configure.log文件,发现下面的消息,表明它找不到thrift模块的位置。

configure:10377: checking thrift/protocol/TBinaryProtocol.h usability
configure:10377: g++ -c -g -O2  -D_GNU_SOURCE  conftest.cpp >&5
conftest.cpp:76:45: fatal error: thrift/protocol/TBinaryProtocol.h: No such file or directory
 #include <thrift/protocol/TBinaryProtocol.h>

如何解决这个问题?任何帮助将不胜感激。

4

2 回答 2

1

我认为您的节​​俭安装路径不是/root/Downloads/hawq/thrift-0.9.1/lib/. 你能试试/usr/local/include/thrift吗?

于 2017-02-19T16:24:46.413 回答
-1

也许您可以尝试使用 yum 安装 thrift。

于 2017-02-18T10:30:38.483 回答