标签:
yum install autoconf yum install libtool
# cd /root/soft/protobuf-2.7.0
if test ! -e gmock; then echo "Google Mock not present. Fetching gmock-1.7.0 from the web..." curl $curlopts -O https://googlemock.googlecode.com/files/gmock-1.7.0.zip unzip -q gmock-1.7.0.zip rm gmock-1.7.0.zip mv gmock-1.7.0 gmock fi
将gmock放置在安装目录:
# cp ../gmock-1.7.0.zip . # mv gmock-1.7.0.zip gmock
开始安装:
# ./autogen.sh # 生成configure脚本 # ./configure # make # make check # make install /usr/local/bin/protoc
# cd php-protocolbuffers-master # phpize # ./configure # make # make install
问题:
Can‘t find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
# yum install php-devel
然后在你的php.ini配置文件中添加 extension = "protocolbuffers.so"
# php -m | grep protocolbuffers
protocolbuffers
标签:
原文地址:http://www.cnblogs.com/chunguang/p/5830742.html