linux下安装protobuf及在python与php上的应用
下载解压源文件
github上的版本发布地址
https://github.com/protocolbuffers/protobuf/releases
下载&解压&进入源码目录
当前下载protobuf2的最后一个版本
wget
https://github.com/google/protobuf/archive/v2.6.1.zip
unzip v2.6.1.zip -d ./
cd protobuf-2.6.1
请根据自己的需求下载对应的版本,当前操作演示版本为protobuf2,及.proto文件中syntax = ”proto2″;开头的
安装依赖
sudo apt-get install autoconf automake libtool
其他非debian发行版的机器安装对应的依赖扩展即可
生成configure文件
./
autogen.sh
如果无法连接google网站
修改
curl
http://googletest.googlecode.com/files/gtest-1.5.0.tar.bz2
| tar jx
mv gtest-1.5.0 gtest
为
wget
https