[英]mongo php library installation error
我有mongodb 3.2.3版和php mongo驱动程序1.6.12版。 我正在尝试使用composer安装mongo-php库 。
$ composer require "mongodb/mongodb=^1.0.0"
并得到此错误:
Your version of PHP, 5.4.16, is affected by CVE-2013-6420 and cannot safely perform certificate validation, we strongly suggest you upgrade.
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
问题1
- mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php.ini
- /etc/php.d/curl.ini
- /etc/php.d/dom.ini
- /etc/php.d/fileinfo.ini
- /etc/php.d/json.ini
- /etc/php.d/mbstring.ini
- /etc/php.d/mysql.ini
- /etc/php.d/mysqli.ini
- /etc/php.d/pdo.ini
- /etc/php.d/pdo_mysql.ini
- /etc/php.d/pdo_sqlite.ini
- /etc/php.d/phar.ini
- /etc/php.d/posix.ini
- /etc/php.d/sqlite3.ini
- /etc/php.d/sysvmsg.ini
- /etc/php.d/sysvsem.ini
- /etc/php.d/sysvshm.ini
- /etc/php.d/wddx.ini
- /etc/php.d/xmlreader.ini
- /etc/php.d/xmlwriter.ini
- /etc/php.d/xsl.ini
- /etc/php.d/zip.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, deleting ./composer.json.
需要帮助解决此问题。 我使用的是错误版本的库吗?有人可以从我可以安装mongo php库的地方共享链接或命令。
Your version of PHP, 5.4.16, is affected by CVE-2013-6420
您需要更新您的php版本。 转到php 7!
对于低于php 5.6 plz的尝试:
$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
或根据您的php版本下载mongodb.so文件,然后将其粘贴到php / ext文件夹中。
有关mongo lib和驱动程序兼容性的更多信息,请使用下面的链接
$pecl install mongodb
。 在php.ini中,添加extension=mongodb.so
。 如果出现错误: sasl.h notfound
,则需要安装cyrus-sasl-devel,如果php-pear出现错误,则由于版本php 5.6,您应该卸载php-pear并安装php56w-pear。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.