composer.json 解决依赖冲突

安装依赖包:

“kelvinmo/simplejwt”: “^0.3.0”

时,报错如下:

Problem 1
– hedeqiang/umeng 1.0.4 requires guzzlehttp/guzzle ^6.3 -> satisfiable by guzzlehttp/guzzle[6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev] but these conflict with your requirements or minimum-stability.
– hedeqiang/umeng 1.0.3 requires guzzlehttp/guzzle ^6.3 -> satisfiable by guzzlehttp/guzzle[6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev] but these conflict with your requirements or minimum-stability.
– hedeqiang/umeng 1.0.2 requires guzzlehttp/guzzle ^6.3 -> satisfiable by guzzlehttp/guzzle[6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev] but these conflict with your requirements or minimum-stability.
– hedeqiang/umeng 1.0.1 requires guzzlehttp/guzzle ^6.3 -> satisfiable by guzzlehttp/guzzle[6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev] but these conflict with your requirements or minimum-stability.
– hedeqiang/umeng 1.0.0 requires guzzlehttp/guzzle ^6.3 -> satisfiable by guzzlehttp/guzzle[6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev] but these conflict with your requirements or minimum-stability.
– hedeqiang/umeng 1.0.3 requires guzzlehttp/guzzle ^6.3 -> satisfiable by guzzlehttp/guzzle[6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev] but these conflict with your requirements or minimum-stability.
– Installation request for hedeqiang/umeng ^1.0 -> satisfiable by hedeqiang/umeng[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4].

需要说明的是,我的composer.json里面的 guzzlehttp/guzzle是如下版本:

“guzzlehttp/guzzle”: “^7.0”,

根据报错,说的是我的’guzzlehttp/guzzle’版本跟’hedeqiang/umeng 1.0.2’不匹配,需要修改成:

[6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev]

才可以。把版本修改为:

“guzzlehttp/guzzle”: “^6.3”

重新执行下composer install 和 composer install 。依赖包的更新成功完成!

Sea Bridge

古之立大志者,不惟有超世之才 亦必有坚韧不拔之志!

发表评论