我正在尝试将Apache HAWQ安装到我的节点上。我参考了Apache HAWQ wiki page (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
尽管我使用configure && make && make install
安装和编译了thrift,但shell命令找不到thrift库。
因此,我输入了find \ -name 'TBinaryProtocol.h*'
来查找安装了与储蓄相关的模块的位置。我收到了下面的消息。
[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
这意味着我有thrift模块,并且我认为它们正确地安装在我的目录中。我按照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>
如何解决这个问题?任何帮助都将不胜感激。
发布于 2017-02-20 00:24:46
我不认为您的thrift安装路径是/root/Downloads/hawq/thrift-0.9.1/lib/
。你能试试/usr/local/include/thrift
吗?
发布于 2017-02-18 18:30:38
也许您可以尝试使用yum安装thrift。
https://stackoverflow.com/questions/42295471
复制相似问题