- 下载protobuf
git clone https://github.com/protocolbuffers/protobuf.git
- 安装ubuntu依赖
sudo apt-get install autoconf automake libtool curl make g++ unzip libffi-dev -y
- 安装脚本
cd protobuf
./autogen.sh
./configure
- 编译安装
make
sudo make install
- 测试protobuf编译工具
protoc -h
go语言支持protocolbuffers/protobuf-go: Go support for Google's protocol buffers (github.com)