Hadoop-2.6.0构建失败

时间:2014-12-03 12:03:22

标签: visual-studio-2010 maven hadoop ant hadoop2

Hadoop 2.6.0构建在Windows中失败。但Hadoop-2.5.0已成功构建。我正在使用visual studio 2010命令提示符构建源代码。

构建失败

[INFO] Apache Hadoop Common ............................... SUCCESS [03:18 min]
[INFO] Apache Hadoop NFS .................................. SUCCESS [ 15.649 s]
[INFO] Apache Hadoop KMS .................................. SUCCESS [ 29.325 s]
[INFO] Apache Hadoop Common Project ....................... SUCCESS [  0.031 s]
[INFO] Apache Hadoop HDFS ................................. FAILURE [ 31.917 s]
[INFO] Apache Hadoop HttpFS ............................... SKIPPED
[INFO] Apache Hadoop HDFS BookKeeper Journal .............. SKIPPED

错误

 [exec] (Link target) ->
 [exec]   jni_helper.obj : error LNK2019: unresolved external symbol __imp_JNI_CreateJavaVM referenced in function getGlobalJNIEnv [K:\Hadoop-2.6.0\hadoop-2.6.0-src\hadoop-hdfs-project\hadoop-hdfs\target\native\hdfs.vcxproj]
 [exec]   jni_helper.obj : error LNK2019: unresolved external symbol __imp_JNI_GetCreatedJavaVMs referenced in function getGlobalJNIEnv [K:Hadoop-2.6.0\hadoop-2.6.0-src\hadoop-hdfs-project\hadoop-hdfs\target\native\hdfs.vcxproj]

异常

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run
(make) on project hadoop-hdfs: An Ant BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec dir="K:\Hadoop-2.6.0\hadoop-2.6.0-src\hadoop
hdfs-project\hadoop-hdfs\target/native" executable="msbuild" failonerror="true">... @
8:140 in K:\Hadoop-2.6.0\hadoop-2.6.0-src\hadoop-hdfs-project\hadoop-hdfs\targe
\antrun\build-main.xml
[ERROR] -> [Help 1]

2 个答案:

答案 0 :(得分:0)

我建议你在Linux evn上构建hadoop。然后你可以将dest文件复制到windows。 我已经构建了hadoop2.2。download link 64bit

答案 1 :(得分:0)

最后我得到了解决问题的方法。我的回答可能对某人有帮助。

我安装了64位Windows 8和java jdk 32位。这是编译hadoop hdfs本地源时的问题。

我刚刚安装了java jdk 64位,问题解决了。