在 Windows 上构建 hadoop 2.2 [英] build hadoop 2.2 on windows

查看:18
本文介绍了在 Windows 上构建 hadoop 2.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在windows上安装hadoop,到目前为止还很麻烦.

I am trying to install hadoop on windows, it is so troublesome so far.

这是我不断收到的错误

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (compile-ms-winutils) on project hadoop-common: Command execution failed. Cannot run program "msbuild" (in directory "C:hdfshadoop-common-projecthadoop-common"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :hadoop-common

我在 windows 7 x64 机器上的环境中设置了 msbuild.exe、windows sdk7.1、cygwin64、maven3.0.5、jdk7.

I have msbuild.exe, windows sdk7.1, cygwin64, maven3.0.5, jdk7 all set up in environment on my windows 7 x64 box.

这是我从 apache 网站下载的 hadoop 2.2.0 src.

This is hadoop 2.2.0 src which i downloaded from apache website.

系统环境下,我已经设置了

under system environment, i have set

C:WindowsMicrosoft.NETFramework64v4.0.30319

这是 msbuild 的路径,但仍然无法正常工作,有谁知道如何解决这个问题?

this is the path to msbuild, but still doesn't work, does anyone know how to fix this?

谢谢

更新:我从

<executable>msbuild</executable>

<executable>msbuild.exe</executable>

现在,我收到以下错误

[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]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :hadoop-common

推荐答案

我找到了解决这个问题的方法.我在 Windows 8.1 上有 VS 2012 和面临这个确切的问题.我检查了 hadoop-common 下的 pom.xml该执行 ID 并运行以下命令

I found the solution to this problem. I have VS 2012 on Windows 8.1 and faced this exact issue. I checked out the pom.xml under hadoop-common for that execution id and ran the following command

F:HDP>msbuild F:HDPhadoop-common-projecthadoop-commonsrcmainwinutilswinutils.sln /nologo/p:Configuration=Release;OutDir=bin

它给了我以下异常

C:Program Files(x86)MSBuildMicrosoft.Cppv4.0V110Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset ='v100') cannot be found.
To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
[F:HDPhadoop-common-projecthadoop-commonsrcmainwinutilslibwinutils.vcxproj]

由于我的机器上没有 Visual Studio 2010,所以问题必须是在解决方案中.我在 VS 2012 中打开了解决方案并编译了一次.再次执行 maven 给了我另一个错误,但这次指向hadoop-commonsrcmain ative ative.sln.我也在 VS 2012 上打开了它没有错误.

Since I do not have Visual Studio 2010 on my machine, the problem had to be in the solution. I opened the solution in VS 2012 and compiled it once. Executing maven again gave me another error but this time pointing to hadoop-commonsrcmain ative ative.sln. I opened that on VS 2012 too and no error.

希望对你有帮助

谢谢罗希特

这篇关于在 Windows 上构建 hadoop 2.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆