protobuf从源码安装

发布时间 2023-09-02 20:07:21作者: woodx

因为新版本编译必须使用bazel,所以为了方便我们先使用protobuf老版本3.15.6

 

下载链接

步骤:
1、解压压缩包:unzip protobuf-master.zip
2、进入解压后的文件夹:cd protobuf-master
3、安装所需工具:sudo apt-get install autoconf automake libtool curl make g++ unzip
4、自动生成configure配置文件:./autogen.sh
5、配置环境:./configure
6、编译源代码(时间比较长):make
7、安装:sudo make install
8、刷新动态库:sudo ldconfig