简体   繁体   中英

Can not install doctrine/mongodb-odm-bundle

I want to install doctrine/mongodb but I get error:

Using version ^4.2 for doctrine/mongodb-odm-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.1.*"
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/mongodb-odm-bundle 4.2.0 requires doctrine/mongodb-odm ^2.0.0 -> satisfiable by doctrine/mongodb-odm[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.1.0, 2.1.1, 2.1.2].
    - doctrine/mongodb-odm-bundle 4.2.1 requires doctrine/mongodb-odm ^2.0.0 -> satisfiable by doctrine/mongodb-odm[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.1.0, 2.1.1, 2.1.2].
    - doctrine/mongodb-odm-bundle 4.2.2 requires doctrine/mongodb-odm ^2.0.0 -> satisfiable by doctrine/mongodb-odm[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.1.0, 2.1.1, 2.1.2].
    - doctrine/mongodb-odm 2.1.2 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - doctrine/mongodb-odm 2.1.1 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - doctrine/mongodb-odm 2.1.0 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - doctrine/mongodb-odm 2.0.6 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - doctrine/mongodb-odm 2.0.5 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - doctrine/mongodb-odm 2.0.4 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - doctrine/mongodb-odm 2.0.3 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - doctrine/mongodb-odm 2.0.2 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - doctrine/mongodb-odm 2.0.1 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - doctrine/mongodb-odm 2.0.0 requires ext-mongodb ^1.5 -> the requested PHP extension mongodb is missing from your system.
    - Installation request for doctrine/mongodb-odm-bundle ^4.2 -> satisfiable by doctrine/mongodb-odm-bundle[4.2.0, 4.2.1, 4.2.2].
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Installation failed, reverting ./composer.json to its original content.

I am using this tutorial https://symfony.com/doc/master/bundles/DoctrineMongoDBBundle/installation.html#install-the-bundle-with-composer Thank you https://www.php.net/manual/en/mongodb.installation.windows.php

As you can see in the output composer tries install doctrine/mongodb-odm-bundle which depends on doctrine/mongodb-odm which requires mongodb extension version 1.5+ installed on your system.

Hint from the tutorial在此处输入图片说明

So, lets go https://docs.mongodb.com/drivers/php#installation :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM