Hadoop2.2.0在Ubuntu编译失败解决方法
2014-07-14 18:41
295 查看
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:29.469s [INFO] Finished at: Mon Nov 18 12:30:36 PST 2013 [INFO] Final Memory: 37M/120M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project hadoop-auth: Compilation failure: Compilation failure: [ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[84,13] cannot access org.mortbay.component.AbstractLifeCycle [ERROR] class file for org.mortbay.component.AbstractLifeCycle not found [ERROR] server = new Server(0); [ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[94,29] cannot access org.mortbay.component.LifeCycle [ERROR] class file for org.mortbay.component.LifeCycle not found [ERROR] server.getConnectors()[0].setHost(host); [ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[96,10] cannot find symbol [ERROR] symbol : method start() [ERROR] location: class org.mortbay.jetty.Server [ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[102,12] cannot find symbol [ERROR] symbol : method stop() [ERROR] location: class org.mortbay.jetty.Server [ERROR] -> [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/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :hadoop-auth
这里是Hadoop官网给出的该错误信息,即hadoop-auth没法编译通过,这里是直接把它们给出的错误信息粘贴过来了,如果你也遇到这个错误的话,可以找到hadoop目录下的hadoop-common-project/hadoop-auth文件夹下,可以看到在这下面有一个.pom文件,因为hadoop是用maven进行构建的,而pom文件是maven构建的必要文件,pom对于maven就相当于make对于Makefile,但是又不是完全相同的,因为pom文件中会给出项目构建所依赖的jar包,由maven自动进行依赖包的下载,从而实现对项目的构建。
这里的修改方法是在这个pom文件中的第58行加入
<artifactId>jetty-util</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> 当然可能因为下载的hadoop版本不同在所在行数上有所不同,具体的可以参见,https://issues.apache.org/jira/secure/attachment/12614482/HADOOP-10110.patch 这时hadoop官方提供的一个补丁,加入这些依赖之后,再进行构建,这里就没有问题了
相关文章推荐
- ubuntu 13 编译hadoop 2.2.0源码出现问题及解决方法
- linux(ubuntu)下编译安装cx_Freeze失败解决方法
- 关于Ubuntu 14.04 x64 安装 Vmware 10 x64 编译 vmnet失败的解决方法
- VMWare Workstation 安装在ubuntu 14.04(15.04) 内核(3.19) 中更新编译失败的解决方法
- ubuntu下编译busybox失败的一种解决方法
- ubuntu 编译 Android 出现的若干错误及解决方法
- wubi安装Ubuntu9.04失败的原因及解决方法
- ubuntu 编译 Android 出现的若干错误及解决方法
- Ubuntu获得根用户权限时su认证失败的解决方法
- Ubuntu输入su提示认证失败的解决方法
- Ubuntu 11.04 下 Android4.0.1 编译错误解决方法
- 64bits Ubuntu下编译Android的步骤,所遇到的问题和解决方法
- [整理]ubuntu10.10编译TQ2440的x86-qtopia-2.2.0编译问题解决精简版
- ubuntu 9.10下编译Bochs 2.4.1出现错误的解决方法
- ubuntu 编译 Android 出现的若干错误及解决方法
- DotNet中编译出现Error spawning cl.exe(启动cl.exe失败)之解决方法
- ubuntu 编译 Android 出现的若干错误及解决方法
- 安装intel c++8.0后导致vc6编译正常的项目链接失败的一个解决方法
- ubuntu 编译找不到sql.h sqltypes.h sqlext.h 解决方法
- ubuntu 编译 Android 出现的若干错误及解决方法