安装步骤
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
make //这一步时间比较长
//可不检查,没影响
make check
sudo make install
sudo ldconfig # refresh shared library cache.

测试
protoc --version //版本号,输出即可
文章参考:https://blog.csdn.net/qq_25272679/article/details/106199566