ElephantBird 包构建失败:

问题描述:

我下载了 ElephantBird 源代码并尝试通过运行mvn package"进行构建,但出现以下错误:

I downloaded ElephantBird source and tried to build by running "mvn package" but I am getting the following error:

[ERROR] Failed to execute goal com.github.igor-petruk.protobuf:protobuf-maven-plugin:0.4:run (default) on project elephant-bird-core: Unable to find 'protoc' -> [Help 1]

我使用的是 mvn 3.0.3 版,我在 Mac 和 Ubuntu 中尝试过,但我遇到了同样的错误.

I am using mvn version 3.0.3 and I tried in the Mac and Ubuntu but I got the same error.

编辑 1:

感谢 Lorand 的评论,我通过升级协议缓冲区解决了上述问题.我还安装了 Thrift 0.7.0,但现在我在大象猪构建过程中遇到了另一个编译失败:

Thanks to Lorand's comments, I resolved the above problem by upgrading the protocol buffer. I also installed Thrift 0.7.0 but now I am having another compilation failure during elephant-pig build:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (default-testCompile) on project elephant-bird-pig: Compilation failure: Compilation failure: [ERROR] /root/elephant-bird/pig/src/test/java/com/twitter/elephantbird/pig/util/TestThriftNameWritableConverter.java:[12,26] invalid inferred types for W; inferred type does not conform to declared bound(s)

确保你之前已经安装了Protocol Buffers (apt-get install protobuf-compiler) 和 Thrift.您还必须在 Elephant-bird 的 pom.xml 中设置 Thrift 的位置.

Make sure that you have previously installed Protocol Buffers (apt-get install protobuf-compiler) and Thrift. You also have to set Thrift's location in Elephant-bird's pom.xml.

参见:https://stackoverflow.com/a/12301954