GuzzleHttp kann nicht auf Laravel 5.8 installiert werden
P粉458725040
P粉458725040 2024-03-19 17:18:10
0
1
399

Ich verwende Laravel 5.8 und möchte das GuzzleHttp-Paket installieren.

Zuerst habe ich versucht zu laufen composer require guzzlehttp/guzzle, aber ich habe diese Fehlermeldung erhalten:

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].

Dann habe ich versucht, die heruntergestufte Version zu installieren, also habe ich den folgenden Befehl ausgeführt:

composer require "guzzlehttp/guzzle:~5.3"

Aber ich bekomme diesen Fehler:

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.

Was ist hier also das Problem? Wie installiere ich die Laravel 5.8-Version von GuzzleHttp richtig?

P粉458725040
P粉458725040

Antworte allen(1)
P粉496886646

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

作曲家需要 guzzlehttp/guzzle -w

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

-w 标志告诉 Composer 在安装新依赖项时可以更新依赖项。

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

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage