hadoop maven 编译出错
mvn package -Pdist,native -DskipTests -Dtar 编译源码出现
[error] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.5.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
先安装g++等 sudo apt-get install g++ autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev
安装protoc ,不好下载的话,可以下载附件 wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
执行 sudo make sudo make check sudo make install protoc --version
后来编译 mvn package -Pdist,native -DskipTests -Dtar 就OK了