有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

在Windows 7 64位和Java 8上构建hadoop 2.6.0时出现问题

由于hadoop 2.6.0包不包含Windows二进制文件,因此我尝试使用Windows 7 64位、Java 8、Windows SDK 7.1、Apache Maven 3.3.1和Visual Studio 2013自行构建它们。我遵循这些指示:

Hadoop Windows Install Intructions

在Windows SDK 7.1命令提示符下执行此命令后:

mvn package -Pdist,native-win -DskipTests -Dtar

我不断得到以下错误:

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid orcorrupt [E:\build\hadoop-common-project\hadoop-common\src\main\winutils\winutils.vcxproj]

....

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (compile-ms-winutils) on project hadoop-common: Command execution failed. Process exited with an error: 1(Exit value: 1) -> [Help 1]

我尝试过其他线程中建议的不同解决方案,但没有成功:

Remove .Net Framework 4.5 and install version 4

Replacing cvtres.exe

有人能帮我吗

如果您能提供考虑到我的电脑配置的Windows二进制文件(Hadoop 2.6.0、Windows 7 64位和Java 8),这也会很有帮助

谢谢


共 (1) 个答案

  1. # 1 楼答案

    这就是众所周知的VisualStudio 2012版here

    This MSDN thread解释了如何修复它

    总结一下:

    • 或者禁用增量链接,方法是转到

      Project Properties 
         -> Configuration Properties 
             -> Linker (General) 
                -> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
      
    • 或者安装VS2010 SP1


    打开文件建筑。txt位于解压的hadoop-2.6.0-src中。焦油gz或您的版本
    它告诉你如何为Windows构建-检查所有这些:

    我的大楼。txt上写着:

    Building on Windows
    Requirements:
    
    * Windows System
    * JDK 1.6+
    * Maven 3.0 or later
    * Findbugs 1.3.9 (if running findbugs)
    * ProtocolBuffer 2.5.0
    * CMake 2.6 or newer
    * Windows SDK or Visual Studio 2010 Professional
    * Unix command-line tools from GnuWin32 or Cygwin: sh, mkdir, rm, cp, tar, gzip
    * zlib headers (if building native code bindings for zlib)
    * Internet connection for first build (to fetch all Maven and Hadoop dependencies)
    
    If using Visual Studio, it must be Visual Studio 2010 Professional (not 2012).
    Do not use Visual Studio Express.  It does not support compiling for 64-bit,
    which is problematic if running a 64-bit system.  The Windows SDK is free to
    download here:
    
    http://www.microsoft.com/en-us/download/details.aspx?id=8279