下载
wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
安装
tar -zxvf protobuf-2.6.0.tar.gz
sudo apt-get install build-essential
cd protobuf-2.6.0
./configure
make all
make check
sudo make install
检查
protoc --version
问题
如果出现类似 error while loading shared libraries: libprotoc.so.9: …这样的错误,请输入命令:
export LD_LIBRARY_PATH=/usr/local/lib