1.安装依赖
apt-get install -y gcc g++ make pkg-config libtool autoconf automake
2.下载protobuf源码
// 下载最新源码
git clone https://github.com/protocolbuffers/protobuf.git
//如果下载指定release版本的,可以直接从github上下载
3.编译
cd protobuf
./autogen.sh