在Windows 7 64位和Java 8上构建hadoop 2.6.0的问题

时间:2015-05-06 10:53:29

标签: java windows maven hadoop

由于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

任何人都可以帮我吗?

如果您可以考虑我的PC配置(Hadoop 2.6.0,Windows 7 64位和Java 8)提供Windows二进制文件,也会有所帮助。

谢谢!

1 个答案:

答案 0 :(得分:0)

这是已知的Visual Studio 2012问题here

This MSDN thread解释了如何修复它。

总结:

  • 通过转到

    禁用增量链接
    Project Properties 
       -> Configuration Properties 
           -> Linker (General) 
              -> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
    
  • 或安装VS2010 SP1。

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

我的BUILDING.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    
相关问题