Homestead 中启动 PHP artisan queue:work 卡死的解决办法
- Homestead 环境下按教程执行以下代码时
$ php artisan queue:work
出现以下问题:
- 监控队列长时间无反应;
- 提交订单返回 500 错误,并提示:
"Please remove or rename the Redis facade alias in your \"app\" configuration file in order to avoid collision with the PHP Redis extension."
解决方案:
$ sudo apt-get update
$ sudo apt install php-redis
$ sudo php -v // 查看虚拟机的 php 版本
$ sudo service php7.2-fpm restart // 用自己的 php 版本替换掉 7.2
重新执行
$ php artisan queue:work
大哥666,这比编译安装简单多了啊。按照这个解决了