当前位置:网站首页>php中使用google protobuf协议环境配置
php中使用google protobuf协议环境配置
2022-06-25 22:05:00 【ndrandy】
需要安装两个东西
- protoc编译器
- php-protobuf扩展
注意:protoc和php扩展的版本必须保持一致,这边以V3.9.1为例
网络上很多文章,安装了PHP扩展之后,还需要composer去加载,纯属误导,扩展方式和composer二选一即可
安装方法:
- 安装protoc
~# cd /data
~# wget -c https://github.com/protocolbuffers/protobuf/releases/download/v3.9.1/protoc-3.9.1-linux-x86_64.zip
~# unzip protoc-3.9.1-linux-x86_64.zip
~# cd bin/
~# mv protoc /usr/bin/
~# protoc --version
libprotoc 3.9.1
- 安装php-protobuf扩展 (扩展安装和自己php安装的路径有关系,自己根据情况微调)
~# wget -c https://github.com/protocolbuffers/protobuf/releases/download/v3.9.1/protobuf-php-3.9.1.zip
~# unzip protobuf-php-3.9.1.zip
~# cd protobuf-3.9.1/php/ext/google/protobuf
~# /opt/php/bin/phpize
~# ./configure --with-php-config=/opt/php/bin/php-config
~# make
~# make install
phpinfo查看能看到:
protobuf
Version => 3.9.1
到这边,整个环境已顺利配置完成
边栏推荐
- Reprint: detailed explanation of qtablewidget (style, right-click menu, header collapse, multiple selection, etc.)
- Binary, hexadecimal, big end and small end
- Bi-sql stored procedure (I)
- String对象(常量)池
- 达梦数据库修改字段信息采坑记
- Kotlin null pointer bug
- 解决‘tuple‘ object has no attribute ‘lower‘
- Px4 multi computer simulation (gazebo)
- C2. k-LCM (hard version)-Codeforces Round #708 (Div. 2)
- 实例:用C#.NET手把手教你做微信公众号开发(21)--使用微信支付线上收款:H5方式
猜你喜欢

qtcreator 格式化代码

LeetCode-1528-重新排列字符串-哈希表-字符串

二叉排序树

C# IO Stream 流(二)扩展类_封装器

Hbuilderx uses the gaude map to obtain the current location

The software test interview has been suspended. The interviewer always says that the logical thinking is chaotic. What should I do?

YUV444、YUV422、YUV420、YUV420P、YUV420SP、YV12、YU12、NV12、NV21

Gradle的环境安装与配置

转载: QTableWidget详解(样式、右键菜单、表头塌陷、多选等)

Anaconda一文入门笔记
随机推荐
mysql
[Axi] interpretation of Axi protocol atomic access
关于go协程超时退出控制条件与方式分析
Leetcode (435) - no overlapping interval
Mutual conversion between QT utf8 and Unicode encoding, and the Unicode encoding output format is &xxxxx
Hibernate architecture introduction and environment construction (very detailed)
CSDN force value
Informatics Orsay all in one 1353: expression bracket matching | Luogu p1739 expression bracket matching
发送邮件工具类
DPVS-FullNAT模式部署篇
动态验证码
二叉排序树
Ad20 learning notes II
Solving typeerror: Unicode objects must be encoded before hashing
Graduation trip | recommended 5-day trip to London
A. Balance the Bits--Codeforces Round #712 (Div. 1)
STL教程5-STL基本概念及String和vector使用
Screen recording to GIF is an easy-to-use gadget, screentogif, which is free and easy to use!
史上最简单的录屏转gif小工具LICEcap,要求不高可以试试
期末复习【机器学习】