Reputation: 4501
I want to update the composer:
but i am getting following errors:
Problem 1
- yiisoft/yii2-mongodb 2.0.4 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system.
- yiisoft/yii2-mongodb 2.0.3 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system.
- yiisoft/yii2-mongodb 2.0.2 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system.
- yiisoft/yii2-mongodb 2.0.1 requires ext-mongo >=1.4.0 -> the requested PHP extension mongo is missing from your system.
- yiisoft/yii2-mongodb 2.0.0 requires ext-mongo >=1.3.0 -> the requested PHP extension mongo is missing from your system.
- Installation request for yiisoft/yii2-mongodb ~2.0.0 -> satisfiable by yiisoft/yii2-mongodb[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4].
this is my composer.json:
{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Project Template",
"keywords": ["yii2", "framework", "advanced", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": ">=2.0.4",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"yiisoft/yii2-imagine": "*",
"2amigos/yii2-ckeditor-widget": "~1.0",
"2amigos/yii2-tinymce-widget": "~1.1",
"facebook/php-sdk-v4" : "~5.0",
"yiisoft/yii2-mongodb": "~2.0.0"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*"
},
"config": {
"process-timeout": 1800
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
How can i solve this? Please help.
Upvotes: 4
Views: 4404
Reputation: 2021
add extension
extension=mongo.so
to file /etc/php5/cli/php.ini
then restart php
sudo service apapche restart
and retry your install compose command
Upvotes: 0
Reputation: 24298
It might be related to your php.ini
with missing mongo.so
extension.
Even if you have it enabled already for php in browser, composer uses php.ini
for cli.
It's different php.ini
file.
You can find it via:
php --ini
There will be something like:
Loaded Configuration File: /etc/php5/cli/php.ini
Edit this file with sudo:
sudo nano /etc/php5/cli/php.ini
And complete the extension there (last line should be fine):
extension=mongo.so
Restart php and retry composer install
.
It it works, you're done. If not, try to follow mongo install guide.
Upvotes: 2
Reputation: 966
you must install extention to your php . Refer this: http://php.net/manual/ru/mongo.installation.php
Upvotes: 1