mvn安装不起作用(linux)

ubby3x7f  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(362)

所以最近我尝试在我的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

Maven:

$ 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

我在我的根用户(wilson0901)上安装了mahout-0.13.0,然后将user改为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。错了吗?

eyh26e7m

eyh26e7m1#

好吧,我不得不承认这是个愚蠢的“错误”。我没有将mahout目录的所有者更改为hduser。 sudo chown -Rhduser:/usr/local/mahout-0.13.0 .
我在经历了很多挫折之后才明白这一点。即便如此,还有一个问题:当我尝试 $ mvn clean install ,它似乎工作,但最终停止,说连接超时。此时我正在使用maven3.3.9。啊,解决了一个问题之后又是一个问题。

相关问题