我通过pecl安装了amqp。文件夹2020
Build process completed successfully
Installing '/opt/homebrew/Cellar/php/8.2.11/pecl/20220829/amqp.so'
install ok: channel://pecl.php.net/amqp-2.1.0
Extension amqp enabled in php.ini
➜ ~ brew services restart [email protected]
Stopping `php`... (might take a while)
==> Successfully stopped `php` (label: homebrew.mxcl.php)
==> Successfully started `php` (label: homebrew.mxcl.php)
➜ ~ php -v
运行php -v
显示以下问题。错误路径,不是20220829而是20200930
PHP Warning: PHP Startup: Unable to load dynamic library 'amqp.so'
(tried: /opt/homebrew/lib/php/pecl/20200930/amqp.so
1条答案
按热度按时间brvekthn1#
从PHP 8.0升级到8.2导致php.ini文件中的配置错误。我把
extension_dir
改成了extension_dir = "/opt/homebrew/lib/php/pecl/20220829"
,重新启动了phpbrew services restart [[email protected]](https://stackoverflow.com/cdn-cgi/l/email-protection)
,一切都运行得很好。