在 Ubuntu 上安装 Protobuf 3
2019-06-25 09:49
746 查看
什么时候需要安装
如果使用 protoc 命令,遇到 Protoc not found,表示未安装。或者,执行时出现错误:This parser only recognizes "proto2",则表示不是3.0版。
安装过程及可能遇到的问题
安装指令
详细介绍请参考此文:protobuf简单介绍和ubuntu 16.04环境下安装
依次执行以下命令,下载源码编译安装,需要较长时间,超过10分钟。
sudo apt-get install autoconf automake libtool curl make g++ unzip git clone https://github.com/google/protobuf.git cd protobuf git submodule update --init --recursive ./autogen.sh ./configure make make check sudo make install sudo ldconfig # refresh shared library cache.
可能遇到问题
很有可能,执行过程中会出现以下错误提示:
./autogen.sh: 4: ./autogen.sh: autoreconf: not found
解决办法:执行以下命令即可。
sudo apt-get install autoconf sudo apt-get install automake sudo apt-get install libtool
安装完成之后
执行以下命令验证安装结果,查看版本号。
protoc --version
恭喜得到:libprotoc 3.9.0 或更高版本号。
相关文章推荐
- Ubuntu下protobuf及其python runtime的安装
- Ubuntu下关于安装opencv3.x时一直downloading protobuf-cpp-3.1的问题
- ubuntu14.04下protobuf2.6安装
- google protobuf在ubuntu上安装使用步骤
- Ubuntu16.0下关于安装opencv3.x时一直downloading protobuf-cpp-3.1的问题
- ubuntu下安装protobuf
- ubuntu 14.04 安装 cmake 3.3 和 protobuf 2.6.1
- ubuntu 14.04下安装protobuf2.6.1
- Ubuntu 15.04 安装google protobuf步骤
- google protobuf linux ubuntu 16.04 安装
- protobuf-3.0.0-beta-2在Ubuntu14.04的安装
- Ubuntu14.04下安装protobuf 2.6.1
- Ubuntu下protobuf的安装、编译及注意事项
- ubuntu14.04下protobuf2.6安装
- Ubuntu下Protobuf2.4+安装
- Ubuntu 安装Protobuf-php步骤
- LINUX下编译安装PROTOBUF 【UBUNTU10.04+PROTOBUF-2.4.1.TAR.GZ】
- Ubuntu16.04下两个版本的protobuf简单兼容安装
- ubuntu下protobuf安装
- 安装protobuf到Ubuntu14.04