Protocol Buffers 的安装教程(Unix)
首先安装依赖
sudo apt-get install autoconf automake libtool curl make g++ unzip
接下来下载官方库
#下载
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
#安装
./configure
sudo make -j$(nproc) # $(nproc) ensures it uses all cores for compilation 这里括号里填多核编译的数量 也可以直接make "#"号后面为注释内容
sudo make install
sudo ldconfig