1、Your requirements could not be resolved to an installable set of packages.

 

 

原因:不匹配composer.json要求的版本。 

方案一:

composer可以设置忽略版本匹配,

composer install --ignore-platform-reqs

composer update --ignore-platform-reqs

再次执行composer命令可以正常安装包了。

方案二:

删除 composer.lock,命令:composer clearcache

更新依赖,命令:composer update(如果失败,请切换阿里云镜像  composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/)

composer global update

再次执行composer命令可以正常安装包了。

方案三:

安装composer插件包

composer global require "fxp/composer-asset-plugin:^1.4.1"

 我这是那种都没用,因为我之前安装了monolog,所以删掉所有的monolog环境,并且json和lock也删掉,直接输入安装,就成功了