Installation Tools
Yum install autoconf yum install Libtool
Installing the PROTOC Compiler
# cd/root/soft/protobuf-2.7. 0
Autogen.sh:
If test! -e gmock; then"Google mocks not present. Fetching gmock-1.7.0 from the web ... " -O https:///googlemock.googlecode.com/files/gmock-1.7.0.zipunzip-q gmock- 1.7. 0 . zip rm Gmock-1.7. 0 . zip mv Gmock-1.7. 0 GMOCKFI
Place the Gmock in the installation directory:
# CP.. /gmock-1.7. 0 . zip. # mv Gmock-1.7. 0. zip gmock
To start the installation:
#./autogen.sh # Generate Configure script #. /configure# make# make check# make install/usr/local/bin/protoc
Install PHP php-protocolbuffers extension and use
# CD php-protocolbuffers-master# phpize#. /configure# make# make install
Problem:
Can‘t find PHP headers in /usr/include/phpThe php-devel package is required for use of this command.
# yum Install Php-devel
Then add extension = "protocolbuffers.so" in your php.ini config file
# Php-m | grep protocolbuffersprotocolbuffers
1 PHP protocolbuffers Installation