Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MAC-----Hadoop 2.7 Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7

Tags:

hadoop2

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.

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

Command: mvn package -Pdist,native -DskipTests -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

like image 670
wanwan Avatar asked Dec 15 '22 06:12

wanwan


1 Answers

I also encountered this problem when compiled Hadoop native lib on macOS. Solution:

  1. Open the file build-main.xml which error occured:

    vim /Users/wanwenqing/Hadoop/hadoop-2.7.2-src/hadoop-tools/hadoop- pipes/target/antrun/build-main.xml

  2. 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

    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

  3. 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)

    export 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

If it doesn't has error, you can re-run mvn compiler command to build hadoop native lib.

Reference: http://www.itdadao.com/articles/c15a1007838p0.html

like image 100
youyouoe Avatar answered Feb 13 '23 05:02

youyouoe