MQ在laravel中简单使用:
第一种安装方法
首先安装php 扩展 amqp 对于mac 上集成环境MAMP安装
/Applications/MAMP/bin/php/php7.3.29/bin/pecl install amqp
如果不行可以试一下
/Applications/MAMP/bin/php/php7.3.29/bin/pecl install amqp-1.11.0beta
首先安装rabbitmq-c
brew install rabbitmq-c
 查看rabbitmq-c安装目录
/opt/homebrew/Cellar/rabbitmq-c/0.11.0
安装过程提示:Set the path to librabbitmq install prefix [autodetect]
/opt/homebrew/Cellar/rabbitmq-c/0.11.0
php.ini 添加 extension=amqp.so
查看一下
php -i | grep amqp
原文链接:https://blog.csdn.net/weixin_43881802/article/details/121392965
第二种安装方法 下载包:
cd /Applications/MAMP/bin/php/php7.3.29/include/php/ext
wget https:


cd amqp
/Applications/MAMP/bin/php/php7.3.29/bin/phpize
新开一个窗口
brew install rebbitmq -c
 拿到地址
最后想要在m1里编译成功,加上了 --enable-thread-context
./configure --with-php-config=/Applications/MAMP/bin/php/php7.3.33/bin/php-config --with-amqp --with-librabbitmq-dir=/opt/homebrew/Cellar/rabbitmq-c/0.11.0
make
make install
 php.ini 添加 extension=amqp.so
|