gpt4 book ai didi

apache - 在 Windows 上构建 hadoop 2.2

转载 作者:可可西里 更新时间:2023-11-01 14:12:32 24 4
gpt4 key购买 nike

我正在尝试在windows上安装hadoop,一直以来都很麻烦。

这是我不断收到的错误

[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:\hdfs\hadoop-common-project\hadoop-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

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

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

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

C:\Windows\Microsoft.NET\Framework64\v4.0.30319

这是 msbuild 的路径,但仍然不起作用,有人知道如何解决这个问题吗?

谢谢

更新:我在 hadoop-common-project\hadoop-common 的 pom.xml 从

<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 并运行以下命令

F:\HDP>msbuild F:\HDP\hadoop-common-project\hadoop-common\src\main\winutils\winutils.sln /nologo/p:Configuration=Release;OutDir=bin

它给了我以下异常

C:\Program Files(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.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:\HDP\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj]

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

希望对你有帮助

谢谢罗希特

关于apache - 在 Windows 上构建 hadoop 2.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20592050/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com