php - Composer 需要 mongodb/mongodb 失败

标签 php mongodb ubuntu

在ubuntu 18.04,用php 5.6,php5.6-fpm,nginx,使用ubuntu的mongodb

composer require mongodb/mongodb

错误
Using version ^1.4 for mongodb/mongodb
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.


Problem 1
    - mongodb/mongodb 1.4.2 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb has the wrong version (1.4.2) installed.
    - mongodb/mongodb 1.4.1 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb has the wrong version (1.4.2) installed.
    - mongodb/mongodb 1.4.0 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb has the wrong version (1.4.2) installed.
    - Installation request for mongodb/mongodb ^1.4 -> satisfiable by mongodb/mongodb[1.4.0, 1.4.1, 1.4.2].

最佳答案

有同样的问题我可以解决它:

composer require "mongodb/mongodb=^1.4.2" --ignore-platform-reqs

关于php - Composer 需要 mongodb/mongodb 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52124301/

相关文章:

javascript - 将 MySQL 结果转换为用于 Google Graphs 的 JavaScript 数组

Mongodb递归查询

php - 如何在 laravel mongodb 上使用 "not like"?

php - Ubuntu 上的 Codeigniter 没有欢迎消息

linux - Unity3D如何在linux上设置图标

r - 谁能帮我解决这个 crontab?

php - 无法在 TinyMce Wordpress 上保持全屏(查看 -> 全屏)

php - 有关 Kohana ORM 的帮助吗?

php - 如何编写对每个数组值重复自身的 PHP 代码

mongodb - 如何根据数组中匹配对象的数量在 MongoDb 中查找文档