1、从https://github.com/google/protobuf下载protocol buffer
在下载完后,解压后,运行./autogen.sh,因为当前目录上没有gtest,所以会从google网站上下载gtest,但是如果不翻墙,下载是不会成功的
2、将gtest-1.7.0.zip放到protobuf_master目录下
3、unzip gtest-1.7.0.zip,然后mv gtest-1.7.0 gtest
4、sudo ./autogen.sh,提示autoreconf没有找到,需要安装sudo apt-get install autoconf automake libtool
5、安装protobuf,根据需要命令前加sudo
./configure --prefix=./protobuf
make
make check
make install