报错信息如下:

(各种配置在最后面)

hadoop@administrator-virtual-machine:~/Downloads/tar/hadoop-3.0.0-alpha1-src$ mvn clean package -Pdist,native -DskipTests -Dtar
---------------------------------------------------
constituent[0]: file:/usr/share/maven/lib/plexus-cipher.jar
constituent[1]: file:/usr/share/maven/lib/wagon-http-shaded.jar
constituent[2]: file:/usr/share/maven/lib/plexus-interpolation.jar
constituent[3]: file:/usr/share/maven/lib/slf4j-simple.jar
constituent[4]: file:/usr/share/maven/lib/maven-plugin-api-3.x.jar
constituent[5]: file:/usr/share/maven/lib/slf4j-api.jar
constituent[6]: file:/usr/share/maven/lib/maven-settings-builder-3.x.jar
constituent[7]: file:/usr/share/maven/lib/maven-model-builder-3.x.jar
constituent[8]: file:/usr/share/maven/lib/maven-builder-support-3.x.jar
constituent[9]: file:/usr/share/maven/lib/guice.jar
constituent[10]: file:/usr/share/maven/lib/eclipse-aether-api.jar
constituent[11]: file:/usr/share/maven/lib/commons-lang.jar
constituent[12]: file:/usr/share/maven/lib/wagon-provider-api.jar
constituent[13]: file:/usr/share/maven/lib/commons-lang3.jar
constituent[14]: file:/usr/share/maven/lib/maven-embedder-3.x.jar
constituent[15]: file:/usr/share/maven/lib/javax.inject.jar
constituent[16]: file:/usr/share/maven/lib/aopalliance.jar
constituent[17]: file:/usr/share/maven/lib/wagon-http-shared.jar
constituent[18]: file:/usr/share/maven/lib/commons-cli.jar
constituent[19]: file:/usr/share/maven/lib/eclipse-aether-transport-wagon.jar
constituent[20]: file:/usr/share/maven/lib/maven-model-3.x.jar
constituent[21]: file:/usr/share/maven/lib/maven-settings-3.x.jar
constituent[22]: file:/usr/share/maven/lib/eclipse-aether-impl.jar
constituent[23]: file:/usr/share/maven/lib/maven-repository-metadata-3.x.jar
constituent[24]: file:/usr/share/maven/lib/eclipse-aether-spi.jar
constituent[25]: file:/usr/share/maven/lib/wagon-file.jar
constituent[26]: file:/usr/share/maven/lib/plexus-component-annotations.jar
constituent[27]: file:/usr/share/maven/lib/plexus-sec-dispatcher.jar
constituent[28]: file:/usr/share/maven/lib/sisu-inject.jar
constituent[29]: file:/usr/share/maven/lib/guava.jar
constituent[30]: file:/usr/share/maven/lib/maven-artifact-3.x.jar
constituent[31]: file:/usr/share/maven/lib/maven-aether-provider-3.x.jar
constituent[32]: file:/usr/share/maven/lib/eclipse-aether-connector-basic.jar
constituent[33]: file:/usr/share/maven/lib/plexus-utils.jar
constituent[34]: file:/usr/share/maven/lib/maven-compat-3.x.jar
constituent[35]: file:/usr/share/maven/lib/commons-io.jar
constituent[36]: file:/usr/share/maven/lib/maven-core-3.x.jar
constituent[37]: file:/usr/share/maven/lib/cdi-api.jar
constituent[38]: file:/usr/share/maven/lib/jsoup.jar
constituent[39]: file:/usr/share/maven/lib/sisu-plexus.jar
constituent[40]: file:/usr/share/maven/lib/eclipse-aether-util.jar
constituent[41]: file:/usr/share/maven/conf/logging/
---------------------------------------------------
Exception in thread "main" com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3955)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4870)
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4876)
at com.google.inject.internal.FailableCache.get(FailableCache.java:48)
at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)
at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:137)
at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:533)
at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:160)
at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:123)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:206)
at org.apache.maven.cli.MavenCli.container(MavenCli.java:545)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:281)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:543)
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: java.lang.NoClassDefFoundError: Could not initialize class com.google.inject.internal.cglib.core.$ReflectUtils
at com.google.inject.internal.cglib.reflect.$FastClass$Generator.getProtectionDomain(FastClass.java:73)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:206)
at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:65)
at com.google.inject.internal.BytecodeGen.newFastClass(BytecodeGen.java:204)
at com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:55)
at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:159)
at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:90)
at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
at com.google.inject.internal.FailableCache$1.load(FailableCache.java:37)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3540)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2321)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2284)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2199)
... 28 more
hadoop@administrator-virtual-machine:~/Downloads/tar/hadoop-3.0.0-alpha1-src$

一、java版本:

hadoop@administrator-virtual-machine:~$  java -version

java version "9-ea"

Java(TM) SE Runtime Environment (build 9-ea+152)

Java HotSpot(TM) Server VM (build 9-ea+152, mixed mode)

1     /usr/lib/jvm/java-8-openjdk-i386/jre/bin/java   1081      manual mode

* 2     /usr/lib/jvm/java-9-oracle/bin/java             1091      manual mode

二、Mvn版本

hadoop@administrator-virtual-machine:~$ mvn --version

Apache Maven 3.3.9

Maven home: /usr/share/maven

Java version: 9-ea, vendor: Oracle Corporation

Java home: /usr/lib/jvm/java-9-oracle

Default locale: en_US, platform encoding: UTF-8

OS name: "linux", version: "4.4.0-59-generic", arch: "i386", family: "unix"

三、.bashrc配置

hadoop@administrator-virtual-machine:~$ vim ~/.bashrc

export JAVA_HOME=/usr/lib/jvm/java-9-oracle

export JRE_HOME=$JAVA_HOME/jre

export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib

export HADOOP_PREFIX=/usr/local/hadoop

export HADOOP_HOME=/usr/local/hadoop

export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native

export M2_HOME=/usr/share/maven

export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin

四、/etc/environment配置

hadoop@administrator-virtual-machine:~$ sudo gedit /etc/environment

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

export JAVA_HOME=/usr/lib/jvm/java-9-oracle

export JRE_Home=$JAVA_HOME/jre

export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib

五、/etc/profile配置

hadoop@administrator-virtual-machine:~$ sudo gedit /etc/profile

export JAVA_HOME=/usr/lib/jvm/java-9-oracle

export JRE_HOME=$JAVA_HOME/jre

export CLASSPATH=$CLASSPATH:.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib

export M2_HOME=/usr/share/maven

export M2=$M2_HOME/bin

export MAVEN_OPTS="-Xms256m -Xmx512m"

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$M2_HOME/bin:$PATH

六、~/.m2/settings.xml配置

hadoop@administrator-virtual-machine:~$ sudo gedit ~/.m2/settings.xml

<localRepository>${user.home}/.m2/repository</localRepository>

<profile>

<id>jdk-1.9</id>

<activation>

<jdk>1.9</jdk>

</activation>

<repositories>

<repository>

<id>jdk19</id>

<name>Repository for JDK 1.9 builds</name>

<url>http://www.myhost.com/maven/jdk19</url>

<layout>default</layout>

<snapshotPolicy>always</snapshotPolicy>

</repository>

</repositories>

</profile>

在Ubuntu中,用mvn打包hadoop源代码时报错,正在解决中!!!的更多相关文章

  1. 关于pycharm中安装第三方库时报错的解决办法(一)

    记录自己的生活!   一.事发背景 在pycharm中直接安装第三方库时因为版本问题总是无法安装成功,事情不大,但是很重要.   二.经过 最开始我自己电脑上安装了Python3.6和Python2. ...

  2. hadoop安装时报错 /usr/local/hadoop-2.6.0-stable/hadoop-2.6.0-src/hadoop-hdfs-project/hadoop-hdfs/target/findbugsXml.xml does not exist

    安装时报错:Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (site) on project ...

  3. 解决首次在eclipse中使用maven构建hadoop等项目时报Missing artifact sun.jdk:tools:jar:1.5.0的问题

    问题原因: eclipse中的maven插件默认没有引用环境变量,所以找不到jdk的路径,也就找不到tool.jar. 解决办法: 步骤如下: 1.关闭eclips 2.在eclipse的解压目录中与 ...

  4. 将MyEclipse中的项目导入到Eclipse中报错的解决放法

    1.导入项目后,会报红色感叹号, 将项目右键,点击红色框.

  5. Springboot+mybatis中整合过程访问Mysql数据库时报错

    报错原因如下:com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone.. 产生这个 ...

  6. 在Android Studio中打开Android Device Monitor时报错的解决方法

    在Android Studio中打开Android Device Monitor时报以下错误时(Android-SDK\tools\lib\monitor-x86_64\configuration\1 ...

  7. ionic中generate page后module.ts报错的解决办法

    此问题出现在Ionic官方将版本从2.2升级到Ionic3以上之后, 在项目中generate page时,自动创建的module.ts就报错,如下: 解决办法如下: 1)将IonicModule替换 ...

  8. kettle添加hadoop cluster时报错Caused by: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: hadoop:password@node56:9000

    完整报错是: Caused by: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: ...

  9. Qt Creator中增加新的ui文件时报错

    原因分析:moc_开头的文件编译过程中没有又一次生成导致. 解决的方法:删除编译产生的build目录.又一次编译就可以. 错误类型截图例如以下: 这个问题的解决.使得能够在不论什么时候都能够在proj ...

随机推荐

  1. 关于火狐浏览器在ubuntu和安卓手机上的同步

    最近在ubuntu使用火狐浏览器,感觉还不错.我想着,如果在我的安卓手机上装一个火狐浏览器,我就可以在手机上查看电脑上所收藏的网站了.然后我就去安卓应用市场下载了最新版的火狐浏览器.令人奇怪的是,我在 ...

  2. Intel 快速存储蓝屏

    今天电脑蓝屏,DPC Watchdog Violation 很烦.开bluescreen说是NT内核的问题 开windbg说是Intel快速存储的问题,顺手卸载快速存储 卸载前 卸载后 另外我看Int ...

  3. Winform C# 编程 1

    http://b6ec263c.wiz03.com/share/s/2SX2oY0nX4f32CY5ax1bapaL01Wmfc0B-QfB2pS1y13peTbq

  4. mdns小结

    mdns的功能和普通DNS很类似,即提供主机名到IP地址的解析服务.   mdns一些基本特性: 1,mdns主要为小型私有网络(不存在DNS)提供名称解析. 2,mdns使用多播(Multicast ...

  5. 两个有序数列,求中间值 Median of Two Sorted Arrays

    原题: There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the ...

  6. Angular - Can't bind to 'ngModel' since it isn't a known property of 'input'.

    用[(ngModel)]="xxx"双向绑定,如:控制台报错:Can't bind to 'ngModel' since it isn't a known property of ...

  7. Ubuntu下删除mysql数据库

    Ubuntu下删除mysql数据库 sudo apt-get autoremove --purge mysql-server-5.7 sudo apt-get remove mysql-server ...

  8. thinkcmf5更新模板代码分析,解决模板配置json出错导致数据库保存的配置项内容丢失问题

    private function updateThemeFiles($theme, $suffix = 'html') { $dir = 'themes/' . $theme; $themeDir = ...

  9. java的重载(overload) (2013-10-11-163 写的日志迁移

    有以下几点: 1.方法名相同. 2.方法的 参数类型.个数.顺序至少有一项不同. 3.方法的返回类型可以不同. 4.方法的修饰符可以不同. 5.仅返回类型和修饰符不同也不可以构成重载.   ----- ...

  10. 9-11.Yii2.0框架控制器分配视图并传参xss攻击脚本视图的过滤

    目录 一维数组传参 新建控制器: 新建view模板 二维数组传参 新建控制器: 新建view模板 视图非法字符的过滤 新建控制器: 新建view模板 一维数组传参 新建控制器: D:\xampp\ht ...