Score:0

install php-rdkafka on ubuntu20.04

ru flag

I am trying to install php-rdkafka lib: https://arnaud.le-blanc.net/php-rdkafka-doc/phpdoc/index.html on my ubuntu 20.04, php 8.0. With php8.0-dev package installed.

the suggested installation via PECL give me this error:

PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/share/php/PEAR/Config.php on line 2095

So I turn to manual installation, and after finish it without no error, when php.ini try to load the module give me this message:

PHP Warning: PHP Startup: rdkafka: Unable to initialize module
Module compiled with module API=20210902
PHP compiled with module API=20200930
These options need to match
in Unknown on line 0

How can I solve it? thanks

David avatar
cn flag
I would ask the people that made this php-rdkafka lib that question.
JahStation avatar
ru flag
i have read similar question where the suggestion is to update modules, in my case, i can understand what i can update!
Jeff avatar
mx flag
I think that the errors mean that the thing you are trying to install has invalid PHP code. For example, PHP does not like curly braces (or "{ }") for some reason anymore. If you can find the thing's repository and edit the code, you can, but I would just recommend finding an alternative to the program that you are trying to run and install.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.