`
lookqlp
  • 浏览: 340995 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

hadoop-2.2.0编译import eclipse

阅读更多
编译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 information 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].
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics