源码编译安装Protobuf

源码编译Protobuf

安装依赖

sudo apt-get install autoconf automake libtool curl make g++ unzip

下载protobuf源码

link: https://github.com/protocolbuffers/protobuf/releases

Note: 把third_party路径下的内容补全

编译

cd protobuf-3.6.0.1

git init

git submodule update --init --recursive

./autogen.sh

./configure

make -j{your threads}

sudo make install

sudo ldconfig

# Check ptoroc version
protoc --version

Install successfully!

原文地址:https://www.cnblogs.com/nanmi/p/14927535.html