These are chat archives for arnaud-lb/php-rdkafka

31st
Oct 2017
Mohsen Ibrahim
@mohsenSy
Oct 31 2017 13:29 UTC
Hi guys, I need to install php-rdkafka to use monolog-kafka handler but I am getting an error when trying to install it manually
I followed the instruction here
When I execute make all
I get the error found here
I installed librdkafka with sudo apt-get install librdkafka-dev
I am using Ubuntu 14.04 server
Can you help me please?
Robert Slootjes
@slootjes
Oct 31 2017 13:50 UTC
apt-get install librdkafka1 librdkafka++1 librdkafka-dev -y
pecl install rdkafka
thats what I use now
and add "extension=rdkafka.so" to php.ini
Mohsen Ibrahim
@mohsenSy
Oct 31 2017 13:51 UTC
root@51d3c4c6e673:~# pecl install rdkafka
No releases available for package "pecl.php.net/rdkafka"
install failed
The same error still appears after I run make all
Robert Slootjes
@slootjes
Oct 31 2017 13:52 UTC
my docker image is based on ubuntu 15.04
Mohsen Ibrahim
@mohsenSy
Oct 31 2017 13:53 UTC
I use Ubuntu 14.04
15.04 is old by now and not supported
Robert Slootjes
@slootjes
Oct 31 2017 13:53 UTC
only use it for development and there it's fine
Mohsen Ibrahim
@mohsenSy
Oct 31 2017 13:53 UTC
now pecl isntall rdkafka gives the same error as above
Robert Slootjes
@slootjes
Oct 31 2017 13:54 UTC
what php version?
I run 7.1
Mohsen Ibrahim
@mohsenSy
Oct 31 2017 13:54 UTC
And when I want to use it on production server what should I do?
PHP 5.6.30-11
Robert Slootjes
@slootjes
Oct 31 2017 13:56 UTC
that might be the reason then that it works for me... not sure why the make fails, havent tried
Mohsen Ibrahim
@mohsenSy
Oct 31 2017 13:57 UTC
I switched to php 7.1 the same error, I think php version is not related to the make process, make all uses gcc to create the library
Robert Slootjes
@slootjes
Oct 31 2017 14:00 UTC
does pecl install work with php 7.1?
Mohsen Ibrahim
@mohsenSy
Oct 31 2017 14:00 UTC
no same error
Robert Slootjes
@slootjes
Oct 31 2017 14:01 UTC
then i have no clue, sorry
Mohsen Ibrahim
@mohsenSy
Oct 31 2017 14:03 UTC
Okay thanks I will keep trying :smile:
Mohsen Ibrahim
@mohsenSy
Oct 31 2017 14:13 UTC
I solved it :clap:
looks like librdkafka library from ubuntu repositories is broken
I installed it manually from here
then run pecl install rdkafka and it worked just fine :smile:
Robert Slootjes
@slootjes
Oct 31 2017 14:14 UTC
great :)