【发布时间】:2021-05-24 14:07:57
【问题描述】:
我在 macOS Big Sur (11.2.1) 上使用 PHP 7.3。
输入 php -version 时,我收到以下错误消息:
php --version 11:12:02
PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/lib/php/pecl/20180731/curl (dlopen(/usr/local/lib/php/pecl/20180731/curl, 9): image not found), /usr/local/lib/php/pecl/20180731/curl.so (dlopen(/usr/local/lib/php/pecl/20180731/curl.so, 9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/lib/php/pecl/20180731/curl (dlopen(/usr/local/lib/php/pecl/20180731/curl, 9): image not found), /usr/local/lib/php/pecl/20180731/curl.so (dlopen(/usr/local/lib/php/pecl/20180731/curl.so, 9): image not found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/pecl/20180731/intl (dlopen(/usr/local/lib/php/pecl/20180731/intl, 9): image not found), /usr/local/lib/php/pecl/20180731/intl.so (dlopen(/usr/local/lib/php/pecl/20180731/intl.so, 9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/pecl/20180731/intl (dlopen(/usr/local/lib/php/pecl/20180731/intl, 9): image not found), /usr/local/lib/php/pecl/20180731/intl.so (dlopen(/usr/local/lib/php/pecl/20180731/intl.so, 9): image not found)) in Unknown on line 0
PHP 7.3.27 (cli) (built: Feb 4 2021 17:29:32) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.27, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.27, Copyright (c) 1999-2018, by Zend Technologies
我该如何解决这个错误?
错误的原因是什么?
【问题讨论】:
-
未找到。可能没有安装 curl。或者检查 php.ini 中的路径。