Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pecl/mongo requires PHP (version >= 5.3.0, version <= 5.99.99), installed version is 7.0.4-7ubuntu2.1 No valid packages found install failed

I would to connect lampp to mongodb so I need to install mongodb client , I do sudo pecl install mongo il m'affiche le message suivant :

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mongo.so' - /usr/lib/php/20151012/mongo.so: undefined symbol: zval_used_for_init in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mongo.dll' - /usr/lib/php/20151012/php_mongo.dll: cannot open shared object file: No such file or directory in Unknown on line 0 WARNING: "pecl/mongo" is deprecated in favor of "channel:///mongodb" pecl/mongo requires PHP (version >= 5.3.0, version <= 5.99.99), installed version is 7.0.4-7ubuntu2.1 No valid packages found install failed, please how to correct this error

like image 503
Sarah Avatar asked Jun 26 '16 07:06

Sarah


2 Answers

mongo is the old driver which is not compatible with PHP 7, you need to use new driver mongodb.

like image 127
malarzm Avatar answered Nov 04 '22 18:11

malarzm


It's easy all you have to do is change it to sudo pecl install mongodb

like image 24
Nimr Sawafta Avatar answered Nov 04 '22 19:11

Nimr Sawafta