hadoop-2.6.0生成失败

f45qwnt8  于 2021-05-30  发布在  Hadoop
关注(0)|答案(2)|浏览(438)

hadoop 2.6.0版本在windows中失败。但是hadoop-2.5.0构建成功。我正在使用visualstudio2010命令提示符构建源代码。
生成失败

[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]
lbsnaicq

lbsnaicq1#

我建议您在linux evn上构建hadoop,然后您可以将dest文件复制到windows。我已经构建了hadoop2.2。这里是64位的下载链接

ego6inou

ego6inou2#

最后我找到了解决这个问题的办法。我的回答可能对某人有所帮助。
我已经安装了64位windows8和32位javajdk。这就是编译hadoop hdfs本机源代码时的问题。
我刚刚安装了64位javajdk,问题就解决了。

相关问题