hadoop 2.2.0版本 'protoc --version' did not return a version ->
来源:互联网 发布:静境电纸书 知乎 编辑:程序博客网 时间:2024/05/16 17:00
按照hadoop官方网站的文档,路径为http://hadoop.apache.org/docs/r2.2.0/hadoop-project-dist/hadoop-common/SingleCluster.html.用svn co http://svn.apache.org/repos/asf/hadoop/common/trunk下载资源,使用 mvn clean install -DskipTests 进行编译时候,抛出异常
INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not return a version -> [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
[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 2.5.0,在官网提示为:NOTE: You will need protoc 2.5.0 installed.
需要安装 protoc 2.5.0,他是google的一个数据缓冲高效可扩展的服务包,
下载地址为http://code.google.com/p/protobuf/downloads/list
由于使用的linux系统,所以下的 protobuf-2.5.0.tar.gz 2.3 MB
然后,安装protobuf 服务包,官方提供的命令如下:
$ ./configure$ make$ make check$ make install 如果,如果系统默认安装了gcc,将会顺利的完成,如果没有的话,将会抛出找不到 找不到当前的文件夹 $path路径,
由于我是用的ubuntu,使用
sudo apt-get install gcc
如果不能安装完成,你需要更行
sudo apt-get update 更新ubuntu 的库
然后再继续的安装 sudo apt-get install gcc
面对下面的错误,百度一下,这是缺少相应的库导致的,所以可能在不同系统,安装不同软件的时候都可能出现。
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
使用下载库文件, sudo apt-get install build-essential
然后,在执行./configure,顺利的完成
在后查看版本,$protoc --version
将会提示找不到 protoc
让你安装 sudo apt-get install protobuf-compiler
不要安装,如果安装了,它和你的protobuf-2.5.0.tar.gz 没什么关系,运行
$protoc --version
libprotoc.2.4.1
hadoop 要求的版本为2.5.0,mvn编译将不通过。
这个时候不慌,因为protobuf-2.5.0.tar.gz 我们已经编译完了,
只需要完成配置完成就行了
$sudo vi /etc/profile
export PROTOC_HOME=/opt/protobuf-2.5.0
export PATH=$PATH:$PROTOC_HOME/src
然后,
$protoc --version
libprotoc.2.5.0
祝你成功
- hadoop 2.2.0版本 'protoc --version' did not return a version ->
- query did not return a unique result
- The provider did not return a ProviderManifestToken string
- MySQL CodeFirst "The provider did not return a ProviderManifestToken string."
- NonUniqueResultException: query did not return a unique result: 2
- SQLServerException: The statement did not return a result set
- query did not return a unique result: 2
- query did not return a unique result: 275
- query did not return a unique result: 3 错误
- The provider did not return a ProviderManifestToken string. 的解决方法
- 【IoT】SSL3_GET_CLIENT_CERTIFICATE:peer did not return a certificate
- 编译pycaffe错误 --#error This file was generated by a newer version of protoc
- caffe.pb.h This file was generated by a newer version of protoc
- error This file was generated by a newer version of protoc
- JDK版本报错:override a superclass method和java compiler level does not match the version
- version
- version
- Version
- 动态链接库和静态链接库
- printk导致系统崩溃
- 插入最少的字符使字符串成为回文
- java的排序方法
- Android SurfaceView游戏开发示例
- hadoop 2.2.0版本 'protoc --version' did not return a version ->
- Linux环境初始化记录
- Android SurfaceView学习示例
- python post数据后读取cookie ,session
- Android View学习示例
- 智能电视的路不好走
- Android SurfaceView
- Android 8款开源游戏引擎
- 手机字库(HTC)