赞
踩
1,安装依赖包:
yum -y install gcc+ gcc-c++
yum -y install make
2,选择对应的pb版本
https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.4
3,使用wget下载对应指定版本的包(任意目录,如/soft)
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.12.4/protoc-3.12.4-linux-x86_64.zip
4,将包解压到执行目录:
unzip -d /usr/local protoc-3.12.4-linux-x86_64.zip
5,添加到环境变量
export PATH=$PATH:/usr/local/bin/
6,查看是否成功
protoc --version
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。