Last updated 2 years ago
在官方Github https://github.com/protocolbuffers/protobuf/releases 找发行版 tar.gz 下载后解压
设置编译后二进制所在的目录。以2.5.0版本为例:
编译并安装
改PATH
检查
./configure --prefix=/usr/local/protobuf2.5.0
make sudo make install
export PROTOBUF=/usr/local/protobuf2.5.0 export PATH=$PATH:$PROTOBUF/bin
protoc --version