hadoop-2.2.0源码编译

编译 hadoop-2.2.0 
下载hadoop-2.2.0-src包,解压 
安装好maven2 
执行 
mvn clean install -DskipTests 
运行报错: 
[ERROR] Failed to execute goal org. apache .hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on project hadoop-common: org. apache .maven.plugin.MojoExecutionException: protoc version is 'libprotoc 2.4.1', expected version is '2.5.0' -> [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 in for mation about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command 
[ERROR]   mvn <goals> -rf :hadoop-common 


安装protoc 
wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz 
(此处下载https://code.google.com/p/protobuf/downloads/list) 
解压执行 sudo ./configure --prefix=/usr 
若安装报错: 
cpp: error trying to exec 'cc1plus': execvp: No such file or directory 


则安装g++ 
sudo apt-get install g++ 


执行 
sudo make 
sudo make check 
sudo make install 
protoc --version 
遇到protoc: error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory 
时 
ubuntu 系统,默认安装在/usr/local/lib下,需要指定/usr。sudo ./configure --prefix=/usr 必须加上--proix参数,重新编译和安装。 


查看BUILDING.txt eclipse部分 


Importing projects to eclipse 

When you import the project to eclipse, install hadoop-maven-plugins at first. 

  $ cd hadoop-maven-plugins 
  $ mvn install 

Then, generate eclipse project files. 

  $ mvn eclipse:eclipse -DskipTests 

At last, import to eclipse by specifying the  root  directory of the project via 
[File] > [Import] > [Existing Projects into Workspace].
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值