Skip to content

Instantly share code, notes, and snippets.

@lucascardial
Forked from wcomnisky/install-php-amqp.sh
Created September 18, 2020 18:29
Show Gist options
  • Save lucascardial/a1a9100cb88b2aee58a127c2520e8c1e to your computer and use it in GitHub Desktop.
Save lucascardial/a1a9100cb88b2aee58a127c2520e8c1e to your computer and use it in GitHub Desktop.
Install PHP AMQp on MacOS
#!/bin/bash
brew search librabbitmq
brew install rabbitmq-c
pecl install amqp
# set the path to librabbitmq install prefix [autodetect] : /usr/local/Cellar/rabbitmq-c/0.10.0
# if it fails follow the following (reference: https://github.com/pdezwart/php-amqp/issues/355#issuecomment-563203121):
git clone https://github.com/pdezwart/php-amqp.git github-pdezwart-php-amqp/
cd github-pdezwart-php-amqp
#git checkout tags/v1.9.4 ./
sudo phpize
./configure --with-librabbitmq-dir=/usr/local/Cellar/rabbitmq-c/0.10.0
make && make install
# Then you just add extension=amqp to your php.ini, restart your php service
php -i|grep amqp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment