我通过命令行sudo pecl install mongodb
在MACOS,XAMPP和PHP 7.1.11上安装了mongodb php驱动程序,然后运行php -v
并出现错误
$ php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 9): Symbol not found: _zend_ce_countable
Referenced from: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so
Expected in: flat namespace
in /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 9): Symbol not found: _zend_ce_countable
Referenced from: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so
Expected in: flat namespace
in /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so in Unknown on line 0
Configuration File (php.ini) Path: /Applications/XAMPP/xamppfiles/etc
Loaded Configuration File: /Applications/XAMPP/xamppfiles/etc/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
请帮忙!