参考:https://github.com/google/protobuf/blob/master/src/README.md
代码Git: https://github.com/google/protobuf
To build protobuf from source, the following tools are needed:
- autoconf
- automake
- libtool
- curl (used to download gmock)
- make
- g++
- unzip
$ ./autogen.sh
$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig # refresh shared library cache.
tips: 可以根据autogen.sh手动下载gmock与gtest