首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >GuzzleHttp无法安装在Laravel5.8上

GuzzleHttp无法安装在Laravel5.8上
EN

Stack Overflow用户
提问于 2022-06-14 10:42:39
回答 1查看 713关注 0票数 0

我正在使用Laravel5.8,我想安装GuzzleHttp软件包。

首先,我尝试运行composer require guzzlehttp/guzzle,但是我得到了以下错误:

代码语言:javascript
运行
复制
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].

然后我尝试安装一个降级版本,所以我运行了以下命令:

代码语言:javascript
运行
复制
composer require "guzzlehttp/guzzle:~5.3"

但是得到了这个错误:

代码语言:javascript
运行
复制
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版本?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-06-14 11:18:47

尝试将-w标志添加到命令中:

composer require guzzlehttp/guzzle -w

您的其他依赖项之一要求guzzlehttp/promises,它当前锁定在composer.lock中的1.4.1中。

-w标志告诉编写器,在安装新依赖项时更新依赖关系是可以的。

如果这不起作用,那么您可以尝试使用-W标志。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72615580

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档