【问题标题】:mvn install on mahout didn't work (linux)mvn install 在 mahout 上不起作用(Linux)
【发布时间】:2017-11-28 10:34:24
【问题描述】:

所以最近我尝试在我的 Ubuntu 上安装 mahout。起初,我安装了 Hadoop 和 Maven,这带来了一些问题,但仍然得到了解决。问题是当我尝试安装 mahout 时,出现错误。实际上,有一些事情让我很困惑。为了使用 Hadoop,我使用新用户(hduser)生成了 ssh 密钥。然后我继续在hduser上安装maven,也就是说maven只安装在hduser上。

以下命令是在我使用$su - hduser 登录后输入的。

hadoop(如果需要):

$ hadoop version
Hadoop 2.7.3
Subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r baa91f7c6bc9cb92be5982de4719c1c8af91ccff
Compiled by root on 2016-08-18T01:41Z
Compiled with protoc 2.5.0
From source with checksum 2e4ce5f957ea4db193bce3734ff29ff4
This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-2.7.3.jar

行家:

$ mvn -version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)
Maven home: /usr/local/apache-maven-3.5.0
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.10.0-24-generic", arch: "amd64", family: "unix"

那么...这是发生错误的地方。错误堆栈跟踪已打开。

hduser@wilson0901-HP-15-Notebook-PC:/usr/local/mahout-0.13.0$ mvn install -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-math:jar:0.13.0
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-hdfs:jar:0.13.0
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-mr:jar:0.13.0
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-math-scala_2.10:jar:0.13.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.mahout:mahout-math-scala_${scala.compat.version}:[unknown-version], /usr/local/mahout-0.13.0/math-scala/pom.xml, line 30, column 15
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-spark_2.10:jar:0.13.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.mahout:mahout-spark_${scala.compat.version}:[unknown-version], /usr/local/mahout-0.13.0/spark/pom.xml, line 30, column 15
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-h2o_2.10:jar:0.13.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.mahout:mahout-h2o_${scala.compat.version}:[unknown-version], /usr/local/mahout-0.13.0/h2o/pom.xml, line 30, column 15
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[WARNING] The project org.apache.mahout:mahout-buildtools:jar:0.13.0 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[WARNING] The project org.apache.mahout:mahout:pom:0.13.0 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Mahout Build Tools
[INFO] Apache Mahout
[INFO] Mahout Math
[INFO] Mahout HDFS
[INFO] Mahout Map-Reduce
[INFO] Mahout Integration
[INFO] Mahout Examples
[INFO] Mahout Math Scala bindings
[INFO] Mahout Spark bindings
[INFO] Mahout Release Package
[INFO] Mahout H2O backend
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Mahout Build Tools 0.13.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-versions) @ mahout-buildtools ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ mahout-buildtools ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Mahout Build Tools ................................. FAILURE [  2.350 s]
[INFO] Apache Mahout ...................................... SKIPPED
[INFO] Mahout Math ........................................ SKIPPED
[INFO] Mahout HDFS ........................................ SKIPPED
[INFO] Mahout Map-Reduce .................................. SKIPPED
[INFO] Mahout Integration ................................. SKIPPED
[INFO] Mahout Examples .................................... SKIPPED
[INFO] Mahout Math Scala bindings ......................... SKIPPED
[INFO] Mahout Spark bindings .............................. SKIPPED
[INFO] Mahout Release Package ............................. SKIPPED
[INFO] Mahout H2O backend ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.177 s
[INFO] Finished at: 2017-06-25T17:51:28+08:00
[INFO] Final Memory: 14M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process (default) on project mahout-buildtools: Error finding remote resources manifests: /usr/local/mahout-0.13.0/buildtools/target/maven-shared-archive-resources/META-INF/NOTICE (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process (default) on project mahout-buildtools: Error finding remote resources manifests
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    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:309)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    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 finding remote resources manifests
    at org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.processResourceBundles(ProcessRemoteResourcesMojo.java:1238)
    at org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.execute(ProcessRemoteResourcesMojo.java:520)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 20 more
Caused by: java.io.FileNotFoundException: /usr/local/mahout-0.13.0/buildtools/target/maven-shared-archive-resources/META-INF/NOTICE (No such file or directory)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
    at java.io.FileWriter.<init>(FileWriter.java:90)
    at org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.processResourceBundles(ProcessRemoteResourcesMojo.java:1146)
    ... 23 more
[ERROR] 
[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

我在我的 root 用户 (wilson0901) 上安装了 mahout-0.13.0,然后将用户更改为 hduser。这是造成问题的原因吗?我真的不知道。我也试过$mvn eclipse: eclipse,但又产生了一个错误:

$ mvn eclipse: eclipse
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-math:jar:0.13.0
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-hdfs:jar:0.13.0
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-mr:jar:0.13.0
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-math-scala_2.10:jar:0.13.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.mahout:mahout-math-scala_${scala.compat.version}:[unknown-version], /usr/local/mahout-0.13.0/math-scala/pom.xml, line 30, column 15
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-spark_2.10:jar:0.13.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.mahout:mahout-spark_${scala.compat.version}:[unknown-version], /usr/local/mahout-0.13.0/spark/pom.xml, line 30, column 15
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.mahout:mahout-h2o_2.10:jar:0.13.0
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.apache.mahout:mahout-h2o_${scala.compat.version}:[unknown-version], /usr/local/mahout-0.13.0/h2o/pom.xml, line 30, column 15
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[WARNING] The project org.apache.mahout:mahout-buildtools:jar:0.13.0 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[WARNING] The project org.apache.mahout:mahout:pom:0.13.0 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Mahout Build Tools
[INFO] Apache Mahout
[INFO] Mahout Math
[INFO] Mahout HDFS
[INFO] Mahout Map-Reduce
[INFO] Mahout Integration
[INFO] Mahout Examples
[INFO] Mahout Math Scala bindings
[INFO] Mahout Spark bindings
[INFO] Mahout Release Package
[INFO] Mahout H2O backend
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Mahout Build Tools ................................. SKIPPED
[INFO] Apache Mahout ...................................... SKIPPED
[INFO] Mahout Math ........................................ SKIPPED
[INFO] Mahout HDFS ........................................ SKIPPED
[INFO] Mahout Map-Reduce .................................. SKIPPED
[INFO] Mahout Integration ................................. SKIPPED
[INFO] Mahout Examples .................................... SKIPPED
[INFO] Mahout Math Scala bindings ......................... SKIPPED
[INFO] Mahout Spark bindings .............................. SKIPPED
[INFO] Mahout Release Package ............................. SKIPPED
[INFO] Mahout H2O backend ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.216 s
[INFO] Finished at: 2017-06-25T18:04:05+08:00
[INFO] Final Memory: 19M/159M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal '' in plugin org.apache.maven.plugins:maven-eclipse-plugin:2.9 among available goals help, make-artifacts, configure-workspace, install-plugins, remove-cache, eclipse, rad-clean, to-maven, myeclipse-clean, add-maven-repo, rad, clean, myeclipse -> [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/MojoNotFoundException

编辑:我使用此链接“apache-mahout-distribution-0.13.0-src.tar.gz”下载了 mahout。是不是错了?

【问题讨论】:

  • 这是一个有趣的错误。你可以试试mvn clean package -DskipTests 看看会发生什么?
  • @rawkintrevo 结果:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process (default) on project mahout-buildtools: Error finding remote resources manifests: /usr/local/mahout-0.13.0/buildtools/target/maven-shared-archive-resources/META-INF/NOTICE (No such file or directory) -&gt; [Help 1]
  • 如果您尝试使用 maven 3.3.9 构建会发生什么? (Mahout 的目标 maven 版本?)
  • @Andrew Palumbo 没有区别。看我的回答。

标签: linux eclipse maven hadoop mahout


【解决方案1】:

好吧,我不得不承认这是一个非常愚蠢的“错误”。我没有将 mahout 目录的所有者更改为 hduser。

sudo chown -Rhduser:/usr/local/mahout-0.13.0.

在经历了很多挫折之后,我发现了这一点。即便如此,又出现了另一个问题:当我尝试$ mvn clean install 时,它似乎工作但最终停止,说连接超时。我此时正在使用 maven3.3.9。啊,解决了一个问题后又出现了一个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-17
    • 2019-12-07
    • 2011-08-26
    • 2017-11-19
    • 2011-06-10
    • 1970-01-01
    • 1970-01-01
    • 2017-10-28
    相关资源
    最近更新 更多