I wanted to install amqp
with pecl for my mac sierra.
I installed php with brew, with pecl install amqp
I receive an error: checking for amqp using pkg-config... configure: error: librabbitmq not found
I installed with brew the librabbitmq-c
package but I still get this error. I think it's somehow not synced with the pkg-config.
Does someone have an idea what to do here?
For Linux/Unix/Mac: 0 you can use the RabbitMQ command line tool. You can also use the rabbitmq-diagnostics to check the server_version. It's a useful tool for diagnostics, health checks and monitoring. The command assumes that accessing your console requires sudo rights.
First install rabbitmq-c with brew:
brew search librabbitmq No formula or cask found for "librabbitmq". Closed pull requests: Add rabbitmq-c (aka librabbitmq) formula (https://github.com/Homebrew/legacy-homebrew/pull/13437) brew install rabbitmq-c
Then install amqp with pecl:
pecl install amqp
Set the path to librabbitmq:
Set the path to librabbitmq install prefix [autodetect] : /usr/local/Cellar/rabbitmq-c/0.9.0
Verify that amqp is now installed:
php -i|grep amqp
The issue lies with pkg-config not being able to generate libs/cflags for librabbitmq.
$ pkg-config librabbitmq --cflags Package openssl was not found in the pkg-config search path. Perhaps you should add the directory containing `openssl.pc' to the PKG_CONFIG_PATH environment variable Package 'openssl', required by 'librabbitmq', not found
What I did was to add both rabbitmq-c and openssl to $PKG_CONFIG_PATH as below:
export PKG_CONFIG_PATH="/usr/local/Cellar/rabbitmq-c/0.10.0/lib/pkgconfig:/usr/local/opt/[email protected]/lib/pkgconfig"
Then the build will succeed. (Note: I built mine with phpbrew rather than pecl, but should work).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With