在MacOS上安装Hadoop导致CMake构建失败

时间:2018-07-29 09:53:09

标签: java hadoop cmake

我正尝试按如下所示首次构建hadoop原生

    [ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.3:cmake-compile (cmake-compile) on project hadoop-common: Error executing CMake: Cannot run program "cmake" (in directory "/Users/krishnanand/projects/hadoop/hadoop-common-project/hadoop-common/target/native"): error=2, No such file or directory -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.3:cmake-compile (cmake-compile) on project hadoop-common: Error executing CMake
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing CMake
    at org.apache.hadoop.maven.plugin.cmakebuilder.CompileMojo.runCMake(CompileMojo.java:176)
    at org.apache.hadoop.maven.plugin.cmakebuilder.CompileMojo.execute(CompileMojo.java:97)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 20 more
Caused by: java.io.IOException: Cannot run program "cmake" (in directory "/Users/krishnanand/projects/hadoop/hadoop-common-project/hadoop-common/target/native"): error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at org.apache.hadoop.maven.plugin.cmakebuilder.CompileMojo.runCMake(CompileMojo.java:166)
    ... 23 more
Caused by: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 24 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 

用于构建本机代码的requirements指出需要CMake v3.1。我已经用brew安装了CMake,安装包列表如下所示:

hadoop (release_3_0_3) $ brew list
autoconf    cmake       gzip        libtool     protobuf@2.5
automake    gcc     isl     mpfr        snappy
bzip2       gmp     libmpc      openssl     zlib

有关cmake的更多信息

hadoop (release_3_0_3) $ brew list cmake
/usr/local/Cellar/cmake/3.12.0/bin/ccmake
/usr/local/Cellar/cmake/3.12.0/bin/cmake
/usr/local/Cellar/cmake/3.12.0/bin/cmakexbuild
/usr/local/Cellar/cmake/3.12.0/bin/cpack
/usr/local/Cellar/cmake/3.12.0/bin/ctest
/usr/local/Cellar/cmake/3.12.0/share/aclocal/cmake.m4
/usr/local/Cellar/cmake/3.12.0/share/cmake/ (2376 files)
/usr/local/Cellar/cmake/3.12.0/share/doc/ (8 files)
/usr/local/Cellar/cmake/3.12.0/share/emacs/site-lisp/cmake/cmake-mode.el
/usr/local/Cellar/cmake/3.12.0/share/man/ (20 files)

我正在尝试安装Hadoop v3.0.3。任何帮助将不胜感激。

0 个答案:

没有答案