【问题标题】:ElephantBird package build failure:ElephantBird 包构建失败:
【发布时间】:2012-11-20 07:58:20
【问题描述】:

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

[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 中尝试过,但我得到了同样的错误。

编辑1:

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

[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)

【问题讨论】:

  • 看起来错误是由于单元测试代码中的一些Java通用代码语法造成的。

标签: apache-pig elephantbird


【解决方案1】:

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

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

【讨论】:

  • 谢谢。现在我收到一条不同的错误消息:[0] 在插件“protobuf-maven-plugin”的定义中指定以下内容: ... VALUE -OR- on命令行,指定:'-DinputDirectories=VALUE'
  • 这个错误会不会是protocol buffer版本不同造成的? pom.xml 说 2.3.0 但我安装的版本是 2.2.0
  • 我安装了 v2.3 并且没有这样的问题。尝试这样做,看看是否有帮助
  • @kee,你能解决这个问题吗?我通过放置 thrift 可执行文件的绝对路径对 pom.xml 进行了更改,但仍然遇到相同的错误。
  • 我放弃了,转而选择了 EB 的 v1.2.4 :(
【解决方案2】:

使用 Java 7 JDK 修复 Java 编译错误。

【讨论】:

  • 我没有任何计划很快重温这个包,但下次我一定会尝试。
猜你喜欢
  • 1970-01-01
  • 2016-05-17
  • 2012-05-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-25
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多