sudo权限
wget https://github.com/google/protobuf/archive/v3.1.0.tar.gz
yum install autoconfautomakelibtool
./autogen.sh
./configure
make && make install
protoc --version
http://studygolang.com/articles/5753
参考资料 protobuf-3.1.0/src
To build protobuf from source, the following tools are needed:
* autoconf
* automake
* libtool
* curl (used to download gmock)
* make
* g++
* unzip
On Ubuntu, you can install them with:
$ sudo apt-get install autoconf automake libtool curl make g++ unzip
On other platforms, please use the corresponding package managing tool to
install them before proceeding.
If you get the source from github, you need to generate the configure script
first:
$ ./autogen.sh
This will download gmock source (which is used for C++ Protocol Buffer
unit-tests) to the current directory and run automake, autoconf, etc.
to generate the configure script and various template makefiles.
You can skip this step if you are using a release package (which already
contains gmock and the configure script).
To build and install the C++ Protocol Buffer runtime and the Protocol
Buffer compiler (protoc) execute the following:
$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig # refresh shared library cache.
* autoconf
* automake
* libtool
* curl (used to download gmock)
* make
* g++
* unzip
On Ubuntu, you can install them with:
$ sudo apt-get install autoconf automake libtool curl make g++ unzip
On other platforms, please use the corresponding package managing tool to
install them before proceeding.
If you get the source from github, you need to generate the configure script
first:
$ ./autogen.sh
This will download gmock source (which is used for C++ Protocol Buffer
unit-tests) to the current directory and run automake, autoconf, etc.
to generate the configure script and various template makefiles.
You can skip this step if you are using a release package (which already
contains gmock and the configure script).
To build and install the C++ Protocol Buffer runtime and the Protocol
Buffer compiler (protoc) execute the following:
$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig # refresh shared library cache.