码迷,mamicode.com
首页 > Web开发 > 详细

1 php protocolbuffers安装

时间:2016-09-01 18:35:15      阅读:335      评论:0      收藏:0      [点我收藏+]

标签:

安装工具

yum install autoconf yum install libtool

 

安装protoc编译器

# cd /root/soft/protobuf-2.7.0

 

autogen.sh :

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

 

安装php的 php-protocolbuffers扩展 及 使用

# 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

 

 

1 php protocolbuffers安装

标签:

原文地址:http://www.cnblogs.com/chunguang/p/5830742.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!