protobuf-3.6 安装(Linux)

官网下载:https://github.com/google/protobuf

https://github.com/google/protobuf/releases

protobuf-all-3.6.0.tar.gz

官网安装手册:https://github.com/google/protobuf/blob/master/src/README.md

安装:

tar zxvf protobuf-all-3.6.0.tar.gz

cd protobuf-3.6.0/
./configure –prefix=/usr/local/protobuf(你的安装路径)
make
make check
make install
protoc –version

添加环境变量:vim ~/.bashrc
export PATH=/usr/local/protobuf/bin/:$PATH
export PKG_CONFIG_PATH=/usr/local/protobuf/lib/pkgconfig/

export LD_LIBRARY_PATH=/usr/local/protobuf/lib:$LD_LIBRARY_PATH

测试:

protoc –verison(查看版本)

which protoc(查看路径)

你可能感兴趣的:(protobuf-3.6 安装(Linux))