-4

Here are the errors that I get when i type :

composer require 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 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. - 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]. - Installation request for doctrine/mongodb-odm-bundle ^4.2.0 -> satisfiable by doctrine/mongodb-odm-bundle[4.2.0].

To enable extensions, verify that they are enabled in your .ini files: - /usr/local/etc/php/7.4/php.ini - /usr/local/etc/php/7.4/conf.d/ext-opcache.ini 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.

  • 1
    Read the error message. You haven't installed the mongodb extension onto PHP. Composer can't do that for you. – thelr Jun 16 '20 at 12:20

1 Answers1

0

You need install extension mongodb. If you using ubuntu you can try command below:

sudo apt install php7.4-mongodb

Hope it's help you.

Dmitry Leiko
  • 3,970
  • 3
  • 25
  • 42