hadoop2.6在win7上的编译-报错处理-Hadoop2|YARN-about云开发

编译前准备,需要安装64位的jdkprotoc(别小看这个,非常重要,我在此耽误好多时候,具体见后面的error)
1、   下载hadoop源码(hadoop-2.6.0-src.tar.gz)并解压:
如解压到:D:\app\workspace\hadoop\hadoop-2.6.0-src
Cmd进入到dos命令方式
Cd /d D:\app\workspace\hadoop\hadoop-2.6.0-src
2、   编译:
Cd  hadoop-maven-plugins
hadoop-maven-plugins
cd ..
mvn eclipse:eclipse -DskipTests
3、   报错信息

1)        Failed to execute goalorg.apache.hadoop:hadoop-maven-plugins:2.6.0:protoc
[ERROR] Failed to execute goalorg.apache.hadoop:hadoop-maven-plugins:2.6.0:protoc (compile-protoc) on projecthadoop-co
mmon: org.apache.maven.plugin.MojoExecutionException: ‘protoc–version’ did not return a version -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed toexecute goal org.apache.hadoop:hadoop-maven-plugins:2.6.0:protoc(compile-protoc) on project hadoop-common:org.apache.maven.plugin.MojoExecutionException: ‘protoc –version’ did notreturn a version
解决方法:
下载protoc-2.5.0-win32.zip,解压,将protoc.exe拷贝到C:\Windows\System32下
安装protobuf-2.5.0
若仍有上述错误,需检查jdk版本(这个把我弄了好久:之前我是1.7,没注意是32位,网上有人共享同样问题后,我重新下载了64位的jdk进行了安装),64位的jdk安装后,一般能解决上述问题。
望对遇到上述问题的朋友有帮助
4、   编译成功信息
————————————-
[INFO] Apache Hadoop MapReduce Examples………………. SUCCESS [ 19.345 s]
[INFO] hadoop-mapreduce…………………………….. SUCCESS [ 0.064 s]
[INFO] Apache Hadoop MapReduce Streaming……………… SUCCESS [  0.508 s]
[INFO] Apache Hadoop Distributed Copy………………… SUCCESS [07:24 min]
[INFO] Apache Hadoop Archives……………………….. SUCCESS [ 0.389 s]
[INFO] Apache Hadoop Rumen………………………….. SUCCESS [ 0.471 s]
[INFO] Apache Hadoop Gridmix………………………… SUCCESS [ 6.339 s]
[INFO] Apache Hadoop Data Join ……………………….SUCCESS [  0.213 s]
[INFO] Apache Hadoop Ant Tasks………………………. SUCCESS [ 0.145 s]
[INFO] Apache Hadoop Extras…………………………. SUCCESS [ 0.190 s]
[INFO] Apache Hadoop Pipes………………………….. SUCCESS [ 0.031 s]
[INFO] Apache Hadoop OpenStack support……………….. SUCCESS [  0.172 s]
[INFO] Apache Hadoop Amazon Web Servicessupport ………. SUCCESS [18:08 min]
[INFO] Apache Hadoop Client…………………………. SUCCESS [ 0.981 s]
[INFO] Apache Hadoop Mini-Cluster……………………. SUCCESS [ 0.261 s]
[INFO] Apache Hadoop Scheduler LoadSimulator …………. SUCCESS [  4.012s]
[INFO] Apache Hadoop Tools Dist……………………… SUCCESS [ 15.571 s]
[INFO] Apache Hadoop Tools………………………….. SUCCESS [ 0.030 s]
[INFO] Apache Hadoop Distribution……………………. SUCCESS [ 0.179 s]
[INFO]————————————————————————
[INFO] BUILD SUCCESS
[INFO]————————————————————————
[INFO] Total time: 41:52 min
[INFO] Finished at:2015-03-18T18:54:02+08:00
[INFO] Final Memory: 86M/788M
[INFO]————————————————————————
D:\app\workspace\hadoop\hadoop-2.6.0-src>

来源URL:http://www.aboutyun.com/thread-12045-1-1.html

《hadoop2.6在win7上的编译-报错处理-Hadoop2|YARN-about云开发》有一个想法

评论已关闭。