`Problem 1
- yiisoft/yii2-mongodb 2.1.2 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system.
- yiisoft/yii2-mongodb 2.1.1 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system.
- yiisoft/yii2-mongodb 2.1.0 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for yiisoft/yii2-mongodb ~2.1.0 -> satisfiable by yiisoft/yii2-mongodb[2.1.0, 2.1.1, 2.1.2].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/15-xml.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-curl.ini
- /etc/php/7.0/cli/conf.d/20-dom.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mbstring.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-simplexml.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
- /etc/php/7.0/cli/conf.d/20-wddx.ini
- /etc/php/7.0/cli/conf.d/20-xmlreader.ini
- /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.0/cli/conf.d/20-xsl.ini
You can also run php --ini
inside terminal to see which files are used by PHP in CLI mode.`
使用的是php 7.0.7,请教大神指点
找到问题了,你安装的是mongo的扩展,没有安装mongodb扩展,安装方式如下:
骚年你mongo扩展版本太低,用pecl重新装个最新的mongodb扩展
不是扩展版本问题,1.2.2的mongodb扩展已经是最新的了
问题解决了吗?