ubuntu 14.04 下hadoop2.9.1 64位编译

最近在学习hadoop,分享一个64位编译的bug.


Ubuntu 14.04
JDK 1.8
maven 3.5.4
hadoop 2.9.1
ProtocolBuffer 2.5.0
cmake 3.6
ubuntu 14.04 下hadoop2.9.1 64位编译

下面这部分是BUILDING里复制过来的/java
* Oracle JDK 1.7 (preferred)
$ sudo apt-get purge openjdk*
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer //本人用的java8
* Maven
$ sudo apt-get -y install maven
* Native libraries
$ sudo apt-get -y install build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev
* ProtocolBuffer 2.5.0 (required)
$ sudo apt-get -y install protobuf-compiler

Optional packages:

* Snappy compression
$ sudo apt-get install snappy libsnappy-dev
* Bzip2
$ sudo apt-get install bzip2 libbz2-dev
* Jansson (C Library for JSON)
$ sudo apt-get install libjansson-dev
* Linux FUSE
$ sudo apt-get install fuse libfuse-dev

然后在hadoop源码包下面执行
$ mvn package -Pdist,native,docs,src -DskipTests -Dtar

下面是错误信息。。。。。
Downloading from nexus-aliyun: http://maven.aliyun.com/nexus/content/groups/public/org/apache/felix/maven-bundle-plugin/2.5.0/maven-bundle-plugin-2.5.0.pom
[WARNING] Failed to create parent directories for tracking file /usr/local/maven/repo/org/apache/felix/maven-bundle-plugin/2.5.0/maven-bundle-plugin-2.5.0.pom.lastUpdated
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.apache.felix:maven-bundle-plugin:2.5.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.felix:maven-bundle-plugin:jar:2.5.0 @
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.hadoop:hadoop-main:2.9.1 (/home/hrz/desktop/hadoop-2.9.1-src/pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin org.apache.felix:maven-bundle-plugin:2.5.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.felix:maven-bundle-plugin:jar:2.5.0: Could not transfer artifact org.apache.felix:maven-bundle-plugin:pom:2.5.0 from/to nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public): /usr/local/maven/repo/org/apache/felix/maven-bundle-plugin/2.5.0/maven-bundle-plugin-2.5.0.pom.part.lock (没有那个文件或目录) -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

最后是安装Apatch Ant后问题解决。由于源码包里的BUILDING文件里没有看到Ant,所以走了很多弯路。这里分享给大家!!!!

注:我个人理解Ant应该跟Cmake是类似的左右,但是我保证我Cmake是安装成功的。至于为什么还需要Ant,我并不是很清楚,也希望大神来解惑!!!

posted on 2018-08-15 16:03  注册中  阅读(530)  评论(0编辑  收藏  举报