2014年10月9日星期四

JDG_008:解决“Cannot run program "protoc": error=2, No such file or directory”问题

环境:MAC OS X 10.9.5 + JBoss Data Grid 6.3.1

学习JBoss Data Grid 时,编译remote-query时,报告如下错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (compile-protoc) on project jboss-remote-query-quickstart: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "protoc": error=2, No such file or directory

[ERROR] around Ant part ...... @ 5:48 in /Users/maping/Share/Software/redhat/datagrid/jboss-datagrid-6.3.1-quickstarts/remote-query/target/antrun/build-main.xml

心想这是官方发布的例子,不该编译不过吧。
于是检查了一遍环境设置,Maven设置,还是不行。

后来发现是缺少protobuf导致的,去 https://code.google.com/p/protobuf/下载protobuf-2.6.0.tar.bz2。
然后:
(1)tar jxvf protobuf-2.6.0.tar.bz2
(2)cd protobuf-2.6.0
(3)./configure
(4)make
(5)make check
(6)make install

 再次编译remote-query,终于通过了。

参考文献:
1. http://blog.csdn.net/zaitianaoxiang/article/details/7639125
2. http://blog.csdn.net/caisini_vc/article/details/5599468


没有评论: