由于驱动程序丢失,无法安装yii2 mongodb扩展

时间:2016-09-17 13:49:58

标签: php mongodb yii2

我试图安装yii2 mongodb扩展,但是当我运行composer update时出现此错误

php -i | grep mongo
/etc/php5/cli/conf.d/20-mongo.ini,
mongo
mongo.allow_empty_keys => 0 => 0
mongo.chunk_size => 261120 => 261120
mongo.cmd => $ => $
mongo.default_host => localhost => localhost
mongo.default_port => 27017 => 27017
mongo.is_master_interval => 15 => 15
mongo.long_as_object => 0 => 0
mongo.native_long => 1 => 1
mongo.ping_interval => 5 => 5

我知道我需要安装驱动程序但是我已经安装了,因为我知道

pecl info mongo

About pecl.php.net/mongo-1.6.14
===============================
Release Type          PECL-style PHP extension (source code)
Name                  mongo
Channel               pecl.php.net
Summary               MongoDB database driver
Description           This package provides an interface for
                      communicating with the MongoDB database in PHP.
Maintainers           Derick Rethans <derick@php.net> (lead)
                      Hannes Magnusson <bjori@php.net> (lead)
                      Jeremy Mikola <jmikola@php.net> (lead)
Release Date          2016-04-26 16:08:28
Release Version       1.6.14 (stable)
API Version           1.6.14 (stable)

并且扩展安装了pecl,我在运行时有这个信息

training_batch_1 : testing_batch_1 = accuracy xxxx;
training_batch_1 : testing_batch_2 = accuracy xxxx;
....
training_batch_1 : testing_batch_50 = accuracy xxxx;

错误的原因是什么?任何帮助将不胜感激,谢谢!!

1 个答案:

答案 0 :(得分:0)

解决了,基本上我不知道有多个mongo扩展安装,Yii需要的是mongodb扩展,我从自制程序安装了一个,现在一切正常,谢谢!