monkeyUser
monkeyUser

Reputation: 4679

Error Install Doctrine-odm MongoDb in Symfony

I have few problems with mongoDb and Symfony. I installed php driver 1.6.12 and I want to install mongoDbBundle

add these lines in my composer.json

{
"require": {
    "doctrine/mongodb-odm": "~1.0",
    "doctrine/mongodb-odm-bundle": "~3.0"
},

}

and Then

php composer.phar update doctrine/mongodb-odm doctrine/mongodb-odm-bundle

But I Have these error

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/mongodb-odm 1.0.0 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1].
    - doctrine/mongodb-odm 1.0.1 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1].
    - doctrine/mongodb-odm 1.0.2 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1].
    - doctrine/mongodb-odm 1.0.3 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1].
    - doctrine/mongodb-odm 1.0.4 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1].
    - doctrine/mongodb 1.2.1 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system.
    - doctrine/mongodb 1.2.0 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system.
    - Installation request for doctrine/mongodb-odm ~1.0 -> satisfiable by doctrine/mongodb-odm[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4].

Upvotes: 1

Views: 1727

Answers (1)

Radu Murzea
Radu Murzea

Reputation: 10920

As you can see, the doctrine/mongodb-odm dependency requires mongo PHP extension to be installed and enabled in your PHP installation.

You can check if you have it by looking into your php.ini file and/or on a page with phpinfo(). If it's not installed/enabled, you have to do it, otherwise you can't install those dependencies.

Upvotes: 3

Related Questions