64位Ubuntu下重新编译Hadoop2.2.0步骤(2)

$ protoc --version protoc: error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory

解决如下:

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib $ protoc --version libprotoc 2.5.0

第3次编译:失败(未安装cmake)

错误信息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (make) on project hadoop-common: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "cmake" (in directory "/home/hadoop/hadoop-2.2.0-src/hadoop-common-project/hadoop-common/target/native"): error=2, No such file or directory -> [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 debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :hadoop-common

解决办法:

apt-get install cmake

第4次编译:失败(未安装libglib2.0-dev)

错误信息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (make) on project hadoop-common: An Ant BuildException has occured: exec returned: 1 -> [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 debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :hadoop-common

解决办法:

apt-get install libglib2.0-dev

第5次编译:失败(未安装libssl-dev)

错误信息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (make) on project hadoop-pipes: An Ant BuildException has occured: exec returned: 1 -> [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 debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :hadoop-pipes

解决办法:

apt-get install libssl-dev

第6次编译:成功

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Apache Hadoop Main ................................. SUCCESS [ 13.578 s] [INFO] Apache Hadoop Project POM .......................... SUCCESS [ 5.183 s] [INFO] Apache Hadoop Annotations .......................... SUCCESS [ 9.527 s] [INFO] Apache Hadoop Assemblies ........................... SUCCESS [ 1.268 s] [INFO] Apache Hadoop Project Dist POM ..................... SUCCESS [ 4.717 s] [INFO] Apache Hadoop Maven Plugins ........................ SUCCESS [ 9.966 s] [INFO] Apache Hadoop Auth ................................. SUCCESS [ 7.368 s] [INFO] Apache Hadoop Auth Examples ........................ SUCCESS [ 3.971 s] [INFO] Apache Hadoop Common ............................... SUCCESS [02:27 min] [INFO] Apache Hadoop NFS .................................. SUCCESS [ 14.996 s] [INFO] Apache Hadoop Common Project ....................... SUCCESS [ 0.078 s] [INFO] Apache Hadoop HDFS ................................. SUCCESS [02:32 min] [INFO] Apache Hadoop HttpFS ............................... SUCCESS [ 30.260 s] [INFO] Apache Hadoop HDFS BookKeeper Journal .............. SUCCESS [ 19.083 s] [INFO] Apache Hadoop HDFS-NFS ............................. SUCCESS [ 8.313 s] [INFO] Apache Hadoop HDFS Project ......................... SUCCESS [ 0.071 s] [INFO] hadoop-yarn ........................................ SUCCESS [ 0.542 s] [INFO] hadoop-yarn-api .................................... SUCCESS [01:07 min] [INFO] hadoop-yarn-common ................................. SUCCESS [ 48.948 s] [INFO] hadoop-yarn-server ................................. SUCCESS [ 0.314 s] [INFO] hadoop-yarn-server-common .......................... SUCCESS [ 18.413 s] [INFO] hadoop-yarn-server-nodemanager ..................... SUCCESS [ 23.891 s] [INFO] hadoop-yarn-server-web-proxy ....................... SUCCESS [ 5.687 s] [INFO] hadoop-yarn-server-resourcemanager ................. SUCCESS [ 24.345 s] [INFO] hadoop-yarn-server-tests ........................... SUCCESS [ 0.721 s] [INFO] hadoop-yarn-client ................................. SUCCESS [ 8.261 s] [INFO] hadoop-yarn-applications ........................... SUCCESS [ 0.168 s] [INFO] hadoop-yarn-applications-distributedshell .......... SUCCESS [ 6.632 s] [INFO] hadoop-mapreduce-client ............................ SUCCESS [ 0.261 s] [INFO] hadoop-mapreduce-client-core ....................... SUCCESS [ 40.147 s] [INFO] hadoop-yarn-applications-unmanaged-am-launcher ..... SUCCESS [ 3.497 s] [INFO] hadoop-yarn-site ................................... SUCCESS [ 0.164 s] [INFO] hadoop-yarn-project ................................ SUCCESS [ 6.054 s] [INFO] hadoop-mapreduce-client-common ..................... SUCCESS [ 29.892 s] [INFO] hadoop-mapreduce-client-shuffle .................... SUCCESS [ 5.450 s] [INFO] hadoop-mapreduce-client-app ........................ SUCCESS [ 18.558 s] [INFO] hadoop-mapreduce-client-hs ......................... SUCCESS [ 9.045 s] [INFO] hadoop-mapreduce-client-jobclient .................. SUCCESS [ 7.740 s] [INFO] hadoop-mapreduce-client-hs-plugins ................. SUCCESS [ 2.819 s] [INFO] Apache Hadoop MapReduce Examples ................... SUCCESS [ 12.523 s] [INFO] hadoop-mapreduce ................................... SUCCESS [ 5.321 s] [INFO] Apache Hadoop MapReduce Streaming .................. SUCCESS [ 8.999 s] [INFO] Apache Hadoop Distributed Copy ..................... SUCCESS [ 13.044 s] [INFO] Apache Hadoop Archives ............................. SUCCESS [ 3.739 s] [INFO] Apache Hadoop Rumen ................................ SUCCESS [ 11.307 s] [INFO] Apache Hadoop Gridmix .............................. SUCCESS [ 8.223 s] [INFO] Apache Hadoop Data Join ............................ SUCCESS [ 6.296 s] [INFO] Apache Hadoop Extras ............................... SUCCESS [ 6.341 s] [INFO] Apache Hadoop Pipes ................................ SUCCESS [ 14.662 s] [INFO] Apache Hadoop Tools Dist ........................... SUCCESS [ 2.694 s] [INFO] Apache Hadoop Tools ................................ SUCCESS [ 0.063 s] [INFO] Apache Hadoop Distribution ......................... SUCCESS [ 44.996 s] [INFO] Apache Hadoop Client ............................... SUCCESS [ 16.908 s] [INFO] Apache Hadoop Mini-Cluster ......................... SUCCESS [ 5.014 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 15:23 min [INFO] Finished at: 2014-10-04T14:54:28+08:00 [INFO] Final Memory: 69M/215M [INFO] ------------------------------------------------------------------------

编译成果

编译生产的文件在`~/hadoop-2.2.0-src/hadoop-dist/target`目录中。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/99b8d6d6949aa7d51b6cd535c04a42e1.html