pecl / mongo需要PHP(版本> = 5.3.0,版本<= 5.99.99),安装版本是7.0.4-7ubuntu2.1没有找到有效的软件包安装失败

我想连接lampp到mongodb所以我需要安装mongodb客户端,我做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

解决方法:

mongo是与PHP 7不兼容的旧驱动程序,你需要使用新的驱动程序mongodb.

上一篇:【JQuery插件】团购倒计时


下一篇:Linux下使用crontab定时备份日志