如何为 PHP 安装 Kafka 的扩展? [英] How do I install an extension of Kafka for PHP?
本文介绍了如何为 PHP 安装 Kafka 的扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我要安装的扩展:https://github.com/EVODelavega/phpkafka
传递给队列的消息应该是 JSON 格式.
The messages passed to the queue should be in JSON format.
目前,我收到安装错误:1. 说明要求我安装 librdkafka.2.上一步的安装链接是this.我无法使用第 1 和第 4 种方法进行安装.这是错误:
Currently, I am getting installation errors: 1. The instructions ask me to install librdkafka. 2. The installation link for the above step is this. I am unable to install using the 1st and 4th method. This is the error:
checking for librdkafka/rdkafka.h" in default path... not found
configure: error: Please reinstall the rdkafka distribution
推荐答案
因为你需要另一个包 librdkafka,你应该先安装librdkafka
because you need another package librdkafka,you should install librdkafka first
- $ git clone https://github.com/edenhill/librdkafka.git
- $ cd librdkafka
- $ ./configure
- $ make &&进行安装
这个方法可以解决你的问题
this way can resolve your problem
这篇关于如何为 PHP 安装 Kafka 的扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文