下载
https://github.com/google/protobuf/releases 找到对应版本下载
编译
cd protobuf
./autogen.sh
./configure
make
安装
make install
查看
protoc --version
Points
./autogen.sh是获取GoogleMock,并生成对应的configure脚本
./configure是进行环境检测,并生成对应的makefile或Makefile --prefix=/usr/local可以指定安装路径
make,按照makefile编译工程
make install,执行makefile里面的install部分,进行安装 --prefix=/usr/local可以指定安装路径
本文提供了一步一步的指南来帮助读者下载、编译并安装 Google 的 Protocol Buffers (Protobuf)。通过访问 GitHub 发布页面选择合适的版本进行下载,然后遵循提供的 shell 脚本指令完成编译与安装过程。
2348

被折叠的 条评论
为什么被折叠?



