我刚刚使用Homebrew在我的mac OSX 10.12.1上安装了Composer:
brew install homebrew/php/composer
然后我打电话
brew info homebrew/php/composer
它显示了这个:
homebrew/php/composer: stable 1.3.0 (bottled), HEAD
Dependency Manager for PHP
http://getcomposer.org
/usr/local/Cellar/composer/1.3.0 (5 files, 1.7M) *
Poured from bottle on 2017-01-08 at 16:33:31
From: https://github.com/Homebrew/homebrew-php/blob/master/Formula/composer.rb
==> Requirements
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php71/7.1.0_11/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/usr/local/Cellar/php71/7.1.0_11/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 9): image not found in Unknown on line 0
Required: phpmeta ✔, phar ✔
如何解决这个问题?
答案 0 :(得分:0)
您的PHP安装存在问题。
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php71/7.1.0_11/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/usr/local/Cellar/php71/7.1.0_11/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 9): image not found in Unknown on line 0
检查MongoDB扩展。也许您已将其删除,但配置仍然包含它(检查/usr/local/etc/php/7.1/conf.d/
中的所有文件)。
答案 1 :(得分:0)
我修好了。这不是作曲家的问题,试图安装Composer只是提醒我这个问题。正如你所说这是mongodb的PHP配置问题。我通过从PHP.ini文件中删除mongodb扩展来修复它。