我正在使用Laravel5.8,我想安装GuzzleHttp软件包。
首先,我尝试运行composer require guzzlehttp/guzzle
,但是我得到了以下错误:
Problem 1
- guzzlehttp/guzzle[7.4.0, ..., 7.4.x-dev] require guzzlehttp/promises ^1.5 -> found guzzlehttp/promises[dev-master, 1.5.0, 1.5.1, 1.5.x-dev (alias of dev-master)] but the package is fixed to 1.4.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires guzzlehttp/guzzle ^7.4 -> satisfiable by guzzlehttp/guzzle[7.4.0, ..., 7.4.x-dev].
然后我尝试安装一个降级版本,所以我运行了以下命令:
composer require "guzzlehttp/guzzle:~5.3"
但是得到了这个错误:
Problem 1
- Root composer.json requires guzzlehttp/guzzle ~5.3, found guzzlehttp/guzzle[5.3.0, ..., 5.3.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 2
- anhskohbo/no-captcha is locked to version 3.3.0 and an update of this package was not requested.
- anhskohbo/no-captcha 3.3.0 requires guzzlehttp/guzzle ^6.2|^7.0 -> found guzzlehttp/guzzle[dev-master, 6.2.0, ..., 6.5.x-dev, 7.0.0-beta.1, ..., 7.4.x-dev (alias of dev-master)] but it conflicts with your root composer.json require (~5.3).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
那么这里出了什么问题?如何正确安装GuzzleHttp的Laravel5.8版本?
发布于 2022-06-14 11:18:47
尝试将-w
标志添加到命令中:
composer require guzzlehttp/guzzle -w
您的其他依赖项之一要求guzzlehttp/promises
,它当前锁定在composer.lock
中的1.4.1
中。
-w
标志告诉编写器,在安装新依赖项时更新依赖关系是可以的。
如果这不起作用,那么您可以尝试使用-W
标志。
https://stackoverflow.com/questions/72615580
复制相似问题