下载protobuf 2.6bash
https://developers.google.com/protocol-buffers/docs/downloads
解压测试
tar -zxf protobuf-2.6.1.tar.gz
进入google
cd protobuf-2.6.1
设置编译目录命令行
./configure --prefix=/User/zh/software/tools/protobuf /User/zh/software/tools/protobuf 为本身设定的编译安装目录
安装code
make
make install
配置环境变量io
sudo vi .bash_profile
新添配置文件编译
export PROTOBUF=/Users/zh/software/tools/protobuf export PATH=$PROTOBUF/bin:$PATH
重启命令行变量
测试配置
protoc --version
结果file
libprotoc 2.6.1