I am trying to install Hadoop 2.7.2 from source, I got the following error, I have googled around but cannot find any solution.
我试图从源代码安装Hadoop 2.7.2,我得到了以下错误,我在google上搜索了,但是找不到任何解决方案。
Please help.
请帮助。
Regards
问候
Mac: 10.11.2 (64-bit); Java: java version "1.8.0_60"; protoc —version: libprotoc 2.5.0 ; maven3.3.9
麦克:10.11.2(64位);Java:Java版本“1.8.0_60”;原始版本:libprotoc 2.5.0;maven3.3.9
Command: mvn package -Pdist,native -DskipTests -Dtar -X
命令:mvn包-Pdist,本地- dskiptest -Dtar -X。
Error message:
错误信息:
[INFO] Apache Hadoop MapReduce Examples ................... SUCCESS [ 2.565 s]
[INFO] hadoop-mapreduce ................................... SUCCESS [ 2.230 s]
[INFO] Apache Hadoop MapReduce Streaming .................. SUCCESS [ 2.199 s]
[INFO] Apache Hadoop Distributed Copy ..................... SUCCESS [ 4.951 s]
[INFO] Apache Hadoop Archives ............................. SUCCESS [ 1.168 s]
[INFO] Apache Hadoop Rumen ................................ SUCCESS [ 3.008 s]
[INFO] Apache Hadoop Gridmix .............................. SUCCESS [ 1.990 s]
[INFO] Apache Hadoop Data Join ............................ SUCCESS [ 1.228 s]
[INFO] Apache Hadoop Ant Tasks ............................ SUCCESS [ 1.143 s]
[INFO] Apache Hadoop Extras ............................... SUCCESS [ 1.574 s]
[INFO] Apache Hadoop Pipes ................................ FAILURE [ 0.627 s]
[INFO] Apache Hadoop OpenStack support .................... SKIPPED
[INFO] Apache Hadoop Amazon Web Services support .......... SKIPPED
[INFO] Apache Hadoop Azure support ........................ SKIPPED
[INFO] Apache Hadoop Client ............................... SKIPPED
[INFO] Apache Hadoop Mini-Cluster ......................... SKIPPED
[INFO] Apache Hadoop Scheduler Load Simulator ............. SKIPPED
[INFO] Apache Hadoop Tools Dist ........................... SKIPPED
[INFO] Apache Hadoop Tools ................................ SKIPPED
[INFO] Apache Hadoop Distribution ......................... SKIPPED
[INFO] -------------------------------------------------------------- ----------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:05 min
[INFO] Finished at: 2016-04-24T11:10:13+08:00
[INFO] Final Memory: 154M/1709M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-
plugin:1.7:run (make) on project hadoop-pipes: An Ant BuildException
has occured: exec returned: 1
[ERROR] around Ant part ...<exec failonerror="true"
dir="/Users/wanwenqing/Hadoop/hadoop-2.7.2-src/hadoop-tools/hadoop-
pipes/target/native" executable="cmake">... @ 5:135 in
/Users/wanwenqing/Hadoop/hadoop-2.7.2-src/hadoop-tools/hadoop-
pipes/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debuglogging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
I have tried to install the libssl-dev, but brew install can't find libssl-dev
我已经尝试安装libssl-dev,但是brew安装找不到libssldev -dev。
1 个解决方案
#1
11
I also encountered this problem when compiled Hadoop native lib on macOS. Solution:
在macOS上编译Hadoop native lib时,我也遇到了这个问题。解决方案:
-
Open the file build-main.xml which error occured:
build-main打开文件。xml错误发生:
vim /Users/wanwenqing/Hadoop/hadoop-2.7.2-src/hadoop-tools/hadoop- Pipes/target/antrun/build-main.xml
vim /用户/ wanwenqing / Hadoop / hadoop-2.7.2-src / hadoop-tools / Hadoop -管道/目标/ antrun / build-main.xml
-
Find the error line and execute:
查找错误行并执行:
cmake /Users/wanwenqing/Hadoop/hadoop-2.7.2-src/hadoop-tools/hadoop-pipes/src/ -DJVM_ARCH_DATA_MODEL = 64
cmake /用户/wanwenqing/Hadoop/ Hadoop/ Hadoop -tools/ Hadoop -tools/ Hadoop -pipes/ -DJVM_ARCH_DATA_MODEL = 64。
Then you will see the specific cause of the error:
然后你会看到错误的具体原因:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the System variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR), suggesting that not found openssl suggested that the need to add environment variables
找不到OpenSSL,尝试在系统变量OPENSSL_ROOT_DIR(缺少OPENSSL_INCLUDE_DIR)中设置OpenSSL根文件夹的路径,这表明没有发现OpenSSL需要添加环境变量?
-
so add these System variable:
所以把这些系统变量:
Export OPENSSL_ROOT_DIR = /usr/local/Cellar/openssl/1.0.2k
(Note that this is openssl installation directory, I use the brew installed openssl)导出OPENSSL_ROOT_DIR = /usr/local/Cellar/openssl/1.0.2k(请注意,这是openssl安装目录,我使用了brew安装的openssl)
Export OPENSSL_INCLUDE_DIR = /usr/local/Cellar/openssl/1.0.2k/include
出口OPENSSL_INCLUDE_DIR = /usr/local/Cellar/openssl/1.0.2k/include
Then execute again:
然后再执行:
cmake /Users/wanwenqing/Hadoop/hadoop-2.7.2-src/hadoop-tools/hadoop-pipes/src/ -DJVM_ARCH_DATA_MODEL = 6
cmake /用户/wanwenqing/Hadoop/ Hadoop/ Hadoop -tools/ Hadoop -tools/ Hadoop -pipes/ -DJVM_ARCH_DATA_MODEL = 6。
If it doesn't has error, you can re-run mvn compiler command to build hadoop native lib.
如果没有错误,您可以重新运行mvn编译器命令来构建hadoop本地库。
Reference: http://www.itdadao.com/articles/c15a1007838p0.html
参考:http://www.itdadao.com/articles/c15a1007838p0.html
#1
11
I also encountered this problem when compiled Hadoop native lib on macOS. Solution:
在macOS上编译Hadoop native lib时,我也遇到了这个问题。解决方案:
-
Open the file build-main.xml which error occured:
build-main打开文件。xml错误发生:
vim /Users/wanwenqing/Hadoop/hadoop-2.7.2-src/hadoop-tools/hadoop- Pipes/target/antrun/build-main.xml
vim /用户/ wanwenqing / Hadoop / hadoop-2.7.2-src / hadoop-tools / Hadoop -管道/目标/ antrun / build-main.xml
-
Find the error line and execute:
查找错误行并执行:
cmake /Users/wanwenqing/Hadoop/hadoop-2.7.2-src/hadoop-tools/hadoop-pipes/src/ -DJVM_ARCH_DATA_MODEL = 64
cmake /用户/wanwenqing/Hadoop/ Hadoop/ Hadoop -tools/ Hadoop -tools/ Hadoop -pipes/ -DJVM_ARCH_DATA_MODEL = 64。
Then you will see the specific cause of the error:
然后你会看到错误的具体原因:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the System variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR), suggesting that not found openssl suggested that the need to add environment variables
找不到OpenSSL,尝试在系统变量OPENSSL_ROOT_DIR(缺少OPENSSL_INCLUDE_DIR)中设置OpenSSL根文件夹的路径,这表明没有发现OpenSSL需要添加环境变量?
-
so add these System variable:
所以把这些系统变量:
Export OPENSSL_ROOT_DIR = /usr/local/Cellar/openssl/1.0.2k
(Note that this is openssl installation directory, I use the brew installed openssl)导出OPENSSL_ROOT_DIR = /usr/local/Cellar/openssl/1.0.2k(请注意,这是openssl安装目录,我使用了brew安装的openssl)
Export OPENSSL_INCLUDE_DIR = /usr/local/Cellar/openssl/1.0.2k/include
出口OPENSSL_INCLUDE_DIR = /usr/local/Cellar/openssl/1.0.2k/include
Then execute again:
然后再执行:
cmake /Users/wanwenqing/Hadoop/hadoop-2.7.2-src/hadoop-tools/hadoop-pipes/src/ -DJVM_ARCH_DATA_MODEL = 6
cmake /用户/wanwenqing/Hadoop/ Hadoop/ Hadoop -tools/ Hadoop -tools/ Hadoop -pipes/ -DJVM_ARCH_DATA_MODEL = 6。
If it doesn't has error, you can re-run mvn compiler command to build hadoop native lib.
如果没有错误,您可以重新运行mvn编译器命令来构建hadoop本地库。
Reference: http://www.itdadao.com/articles/c15a1007838p0.html
参考:http://www.itdadao.com/articles/c15a1007838p0.html