我在依赖项安装上遇到问题。
我在一个在php 7下运行的应用程序上工作,但我有一个问题需要纠正安装mongodb。
我正在使用作曲家,我的要求是这样写的:
"require": {
"mongodb/mongodb": "^1.0.0",
"symfony/yaml": "^3.1",
"phpmailer/phpmailer": "^5.2",
"mustache/mustache": "~2.10"
},
"autoload": {
"psr-0": {
"uuid": "custom/uuid",
"RestServer": "custom/RestServer"
}
}
}
我在我的php ini中添加了extension = mongodb.so,如下所示:
; Extensions
MAMP_apc_MAMP
extension=imap.so
;extension=gettext.so
extension=mcrypt.so
;extension=yaz.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=mongodb.so
当我要更新我的作曲家时,我收到了这条消息:
➜ classes php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1, 1.0.2].
To enable extensions, verify that they are enabled in those .ini files:
- /usr/local/etc/php/7.0/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
我不明白谁出错了。你能帮我开发朋友吗?
感谢您提前!