3
Anthonys-MacBook-Air:activebook numerical25$ php composer.phar update
PHP Warning:  Module 'openssl' already loaded in Unknown on line 0

Warning: Module 'openssl' already loaded in Unknown on line 0
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
    - doctrine/mongodb-odm 1.0.0-BETA6 requires doctrine/mongodb >=1.0.0-beta1,<1.1-dev -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.2, 1.0.3].
    - doctrine/mongodb-odm 1.0.0-BETA7 requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.2, 1.0.3].
    - doctrine/mongodb-odm 1.0.0-BETA8 requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.2, 1.0.3].
    - doctrine/mongodb-odm 1.0.0-BETA9 requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.2, 1.0.3].
    - doctrine/mongodb-odm 1.0.x-dev requires doctrine/mongodb 1.0.* -> satisfiable by doctrine/mongodb[1.0.0, 1.0.1, 1.0.2, 1.0.3].
    - doctrine/mongodb 1.0.3 requires ext-mongo >=1.2.12,<1.5-dev -> the requested PHP extension mongo has the wrong version (1.5.0dev) installed.
    - doctrine/mongodb 1.0.2 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo has the wrong version (1.5.0dev) installed.
    - doctrine/mongodb 1.0.1 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo has the wrong version (1.5.0dev) installed.
    - doctrine/mongodb 1.0.0 requires ext-mongo >=1.2.12,<1.4-dev -> the requested PHP extension mongo has the wrong version (1.5.0dev) installed.
    - doctrine/mongodb-odm 1.0.0-BETA5 requires doctrine/mongodb 1.0.0-BETA1 -> no matching package found.
    - doctrine/mongodb-odm 1.0.0-BETA4 requires doctrine/mongodb 1.0.0-BETA1 -> no matching package found.
    - Installation request for doctrine/mongodb-odm 1.0.*@dev -> satisfiable by doctrine/mongodb-odm[1.0.0-BETA4, 1.0.0-BETA5, 1.0.0-BETA6, 1.0.0-BETA7, 1.0.0-BETA8, 1.0.0-BETA9, 1.0.x-dev].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

我不知道这意味着什么

这就是我的 symfony composer.json 文件中的内容

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "doctrine/mongodb-odm": "1.0.*@dev",
    "doctrine/mongodb-odm-bundle": "3.0.*@dev"
},
4

3 回答 3

5

您的问题是 mongo-php 扩展。该doctrine/mongodb软件包的最新稳定版本不支持您安装1.5.0dev的 mongodb 驱动程序版本。将其降级到最新的 1.4 版本。此外,最好在 composer.json 中参考 beta 包而不是 dev:

"require": {
    "doctrine/mongodb-odm": "1.0.*@beta",
    "doctrine/mongodb-odm-bundle": "3.0.*@beta"
}

所以你minimum-stability可以留下来stable

于 2013-07-29T14:37:27.623 回答
1

这是因为在您的 composer.json 中有这样一行:“minimum-stability”:“dev”,并且您正在尝试导入可能是 MongoDBBundle 的 beta 版本

尝试在 require 部分中使用这些行:

"doctrine/mongodb-odm": "1.0.*@dev",
"doctrine/mongodb-odm-bundle": "3.0.*@dev"
于 2013-07-29T13:38:42.490 回答
-2

我认为您需要从 php.ini 文件中启用 php_mongo.dll 。

如果在 php.ini 文件中找不到,则必须添加

扩展=php_mongo.dll

在 php ini 文件中,然后从 http://pecl.php.net/package/mongo/1.5.5/windows下载 php_mongo.dll 并将其保存在 php/ext/

然后重新启动 apache 现在它不会给出任何错误。

于 2015-08-11T12:05:56.207 回答