2017-02-17 28 views
0

我正在嘗試將Apache HAWQ安裝到我的節點。我參考了Apache HAWQ wiki頁面(https://cwiki.apache.org/confluence/display/HAWQ/Build+and+Install),併成功完成了所有必需的依賴模塊,包括Hadoop,boost,thrift等。在Apache HAWQ中編譯錯誤。找不到位置

並且以下步驟安裝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編譯節儉,shell命令找不到節儉庫。

因此,我輸入find \ -name 'TBinaryProtocol.h*'找到已安裝節儉相關模塊的位置。我得到了下面的消息。

[[email protected] 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維基頁面提供的說明輸入ldconfig -p /root/Downloads/hawq/thrift-0.9.1/lib/

但我得到了同樣的錯誤。最後我搜索了configure.log文件,發現下面的消息,表明它找不到節儉模塊的位置。

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> 

如何解決這個問題?任何幫助將非常感激。

回答

1

我不認爲你的節儉安裝路徑是/root/Downloads/hawq/thrift-0.9.1/lib/。 你可以試試/usr/local/include/thrift

-1

也許你可以嘗試安裝使用百勝的節儉。