arnaud-lb / php-rdkafka

Production-ready, stable Kafka client for PHP
MIT License
2.08k stars 263 forks source link

checking for librdkafka/rdkafka.h" in default path... not found #503

Closed Acing-Boy closed 2 years ago

Acing-Boy commented 2 years ago

Description

i got error

checking for librdkafka/rdkafka.h" in default path... not found

i tried install rdkafka from pecl and from git, all generate same problem.

i install librdkafka using brew

brew install librdkafka

i don't know where the error located, i tried to install librdkafka using git clone and make, i still have same problem.

i wonder if i can change the rdkafka.h default path.. i check my brew the rdkafka is installed correctly..

please help.

php-rdkafka Version

php-kafka 6.x

librdkafka Version

librdkafka: stable 1.8.2

PHP Version

PHP 8.1

Operating System

OSX Monterey

Kafka Version

No response

cjhlai commented 2 years ago

@Ceater i have the same problem,Have you resolved?

Acing-Boy commented 2 years ago

@Ceater i have the same problem,Have you resolved?

nope, i gave up kafka on mac and move to cloud.

installing rdkafka and librdkafka better on centos without any hassel.

arnaud-lb commented 2 years ago

Hi @Ceater @cjhlai

Since brew installs librdkafka in a non-standard path, you may have to specify the librdkafka installation path by using the --with-rdkafka configure option.

For example, if librdkafka is installed in /opt/homebrew/Cellar/librdkafka/1.2.3, you can do this:

./configure --with-rdkafka=/opt/homebrew/Cellar/librdkafka/1.2.3

Then you can run make && sudo make install

Acing-Boy commented 2 years ago

nice, the installation is complete and no problem found..

but when i use it to install laravale package via composer, i still get error that ext-rdkafka is not present..

Steveb-p commented 2 years ago

@Ceater this indicates that while extension is built, it is not enabled in your php.ini file[s].

You can see the files used by calling php --ini and adding the extension=rdkafka.

Acing-Boy commented 2 years ago

where i can see or located installed rdkafka location? because on brew sometimes i need to move the rdkafka.so for php location.