2016-12-08 51 views
-1

我真的很困惑在我的symfony中安裝mongodb。當我刷新我的網站時,我總是得到這個錯誤,我不知道MAMP是否是這個錯誤的一部分。如何加載mongodb包?

Attempted to load class "DoctrineMongoDBBundle" from namespace "Symfony\Bundle\MongoDBBundle" 

在我的composer.json中。我已經將這些代碼添加到composer.json文件中。

"doctrine/mongodb-odm": "^1.0", 
"doctrine/mongodb-odm-bundle": "^3.0" 

但是當我更新使用此作曲家更新作曲家。我總是得到這些錯誤。我不需要修復哪一個。我已經安裝了mongodb。

Problem 1 
    - doctrine/mongodb-odm 1.0.0 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0]. 
    - doctrine/mongodb-odm 1.0.1 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0]. 
    - doctrine/mongodb-odm 1.0.2 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0]. 
    - doctrine/mongodb-odm 1.0.3 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0]. 
    - doctrine/mongodb-odm 1.0.4 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0]. 
    - doctrine/mongodb-odm 1.0.5 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0]. 
    - doctrine/mongodb-odm 1.0.6 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0]. 
    - doctrine/mongodb-odm 1.0.7 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0]. 
    - doctrine/mongodb-odm 1.0.8 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0]. 
    - doctrine/mongodb-odm 1.1.2 requires php ^5.6 || ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement. 
    - doctrine/mongodb-odm 1.1.1 requires php ^5.6 || ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement. 
    - doctrine/mongodb-odm 1.1.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement. 
    - doctrine/mongodb 1.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement. 
    - doctrine/mongodb 1.3.0 requires ext-mongo ^1.5 -> the requested PHP extension mongo is missing from your system. 
    - doctrine/mongodb 1.2.2 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system. 
    - 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, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.1.0, 1.1.1, 1.1.2]. 

我將我的文件添加到htdocs文件夾中的MAMP。我錯過了關於mongodb到MAMP設置的一些事情嗎?或者symfony的版本對這些錯誤至關重要?

+0

您是否安裝並啓用了MongoDB PHP擴展? – Gerry

回答

0

的重要組成部分,從作曲家的輸出

學說/ MongoDB的1.3.0要求EXT-蒙戈^ 1.5 - >請求的PHP擴展蒙戈從系統中丟失。

它告訴你ext-mongo從你的系統中丟失。由於ODM及其捆綁軟件無法安裝,因此您所看到的類錯誤確實不存在。你可以找到ext-mongo的安裝指南here