在Windows上构建hadoop 2.2

2023-11-22

我正在尝试在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

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

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

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

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

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

thanks

更新: 我在 hadoop-common-project\hadoop-common 中稍微更改了 pom.xml

<executable>msbuild</executable>

to

<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 上打开了它 没有错误。

希望这可以帮助

谢谢 罗希特

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在Windows上构建hadoop 2.2 的相关文章

随机推荐

  • jquery - 如何确定 div 是否更改其高度或任何 css 属性?

    当 div 更改其高度或任何 css 属性时 如何触发事件 我有一个 id 的 divmainContent 我希望jquery在改变高度时自动触发一个事件 我做了这样的事情 mainContent change height functi
  • 如何强制 Composer 使用 https:// 而不是 git://?

    我有这样的东西 repositories type package package name myrepo version dev master source url https github com me myrepo git type
  • 将 UITextView / UITextField 中的空格编码为 URL 格式

    我正在尝试将 UITextView 或 UITextField 的内容作为参数发送到 php 文件 NSString urlstr NSString alloc initWithFormat http server com file php
  • Javascript中如何检查字符是否为字母?

    我正在使用以下命令提取 Javascript 字符串中的字符 var first str charAt 0 我想检查一下这是否是一封信 奇怪的是 Javascript 中似乎不存在这样的功能 至少我找不到 我该如何测试这个 我不相信有一个内
  • DialogFragment 参数和空指针异常

    我的类应该向 DialogFragment 传递一个参数 但我的应用程序在 对话框类的 onCreate 方法中因 NullPointerException 而崩溃 对话框片段类部分代码 public class ConfirmDialog
  • 为什么使用匿名类型而不是创建类[重复]

    这个问题在这里已经有答案了 我正在重构一个旧的应用程序 它使用动态内联 SQL 从大型 Oracle 数据库中提取数据 我创建了一个运行良好的存储过程 PL SQL 由于它只有一行 数据行 我让它返回一个数据行 该类驻留在 DAL 中 当我
  • Edge 浏览器中的 focus()

    我在用popup focus 单击按钮后聚焦弹出窗口 这focus 除 EDGE 浏览器外 所有浏览器都可以正常工作 我面临的问题是间歇性的 有时我可以在浏览器上查看弹出窗口 子弹出对话框 有时可以在浏览器后面 即桌面上 查看 并且我可以通
  • 如何使用闹钟类设置闹钟

    您好 我正在尝试使用 AlarmClock 类在我的应用程序中设置闹钟 我使用的代码如下 Intent intent new Intent intent setAction AlarmClock ACTION SET ALARM start
  • 创建新的 Microsoft.CodeAnalysis.CustomWorkspace - 出现 ReflectionTypeLoadException

    我尝试在 NET 编译器平台 Roslyn 示例中创建类似 ConsoleClassifier 的内容 Microsoft CodeAnalysis v0 7 此时我得到了ReflectionTypeLoadException Custom
  • 从 URL 加载时应如何处理视网膜/普通图像?

    我了解如何以编程方式从 URL 为我的应用程序加载图像 而不是将它们打包在应用程序中 但如何处理 1x 与 2x 问题 如果需要 我可以从外部源提供这两个版本 但是在设置 UIImage 时如何处理 我很确定您无法以自动方式远程加载 2x
  • 使用 Node.js 作为简单的 Web 服务器

    我想运行一个非常简单的 HTTP 服务器 每个 GET 请求example com应得index html提供给它 但作为常规 HTML 页面 即 与阅读普通网页时的体验相同 使用下面的代码 我可以读取内容index html 我如何服务i
  • 带有片段或活动的 Android Studio 导航抽屉

    我正在尝试使用 Android Studio 的导航抽屉模板开发一个应用程序 因此 我使用此模板创建了一个新项目 但是当我运行程序并单击菜单项时 视图不会改变 我在互联网上到处搜索 但我不知道如何处理这个问题 这是Android Studi
  • libxslt 是否具有将一个文档拆分为多个文档的功能?

    看起来 libxslt 不支持 XSLT 2 0 并且xsl result document 有没有办法模仿xsl result document using libxslt or xsltproc 是的 有 使用exsl 文档 一个简单的
  • JPA 标准中具有复合主键的 IN 子句

    我有一个名为group tableMySQL 中只有两列user group id and group id 它们都是类型VARCHAR 这两列一起形成一个复合主键 我需要使用子选择执行语句IN 根据传递给查询的值列表选择行 Overrid
  • CakePHP 安全

    我是网络应用程序安全性的新手 我正在 Cakephp 中开发一个应用程序 我的一位朋友告诉我有关跨站点请求伪造 CSRF 和跨站点脚本 XSS 攻击等的信息 但不确定还有多少 我需要一些帮助来了解如何让 Cakephp 保护我的网络应用程序
  • 文本对齐:对齐和图像

    我有一个图像列表 不在列表中 但如果可以解决问题的话可能是 我想填充 div 的整个宽度 我已经尝试过底部的代码 虽然它确实证明了 p 标记中的任何文本合理 但它对图像的作用却不同 我怎样才能让它在 div 的整个宽度上均匀地间隔图像 di
  • 从数据库填充 DropDownList 的正确方法是什么?

    我正在从 SQL Server 数据库填充 DropDownList 如下所示 它工作得很好 但我不确定这是一个好方法 有人可以阐明这种方法并进行一些改进吗 private void LoadSubjects ddlSubjects Ite
  • Android Gradle 代码覆盖率

    我有一个带有测试用例的简单 Android 项目 ProjNameProject build gradle ProjName build gradle 我看到默认情况下android的新构建系统默认提供基本的测试结果 万岁 现在我还想查看代
  • 错误 - 多次出现具有不同值的“contentType”是非法的

    我在 Eclipse 中有一个动态 Web 项目 在 Glassfish4 上运行 在项目中 有一个如下所示的index jsp文件 当我在服务器上运行这个jsp时 出现错误 org apache jasper JasperExceptio
  • 在Windows上构建hadoop 2.2

    我正在尝试在windows上安装hadoop 到目前为止还很麻烦 这是我不断收到的错误 ERROR Failed to execute goal org codehaus mojo exec maven plugin 1 2 exec co