在Laravel中安装PHP 8.2.6的beyondcode/laravel-websockets包时出错[重复]

js5cn81o  于 2023-06-23  发布在  PHP
关注(0)|答案(1)|浏览(223)
    • 此问题已在此处有答案**:

How can I resolve "Your requirements could not be resolved to an installable set of packages" error?(17回答)
7天前关闭
我试图在Laravel项目中使用Composer安装beyondcode/laravel-websockets包,但遇到了依赖性问题。当我运行composer require beyondcode/laravel-websockets命令时,我收到以下错误:

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

  Problem 1
    - beyondcode/laravel-websockets 1.14.0 requires react/http ^1.1 -> satisfiable by react/http[v1.1.0, ..., v1.9.0].
    - beyondcode/laravel-websockets[1.0.0, ..., 1.3.0] require php ^7.1 -> your php version (8.2.6) does not satisfy that requirement.
    - beyondcode/laravel-websockets[1.4.0, ..., 1.10.0] require php ^7.2 -> your php version (8.2.6) does not satisfy that requirement.
    - beyondcode/laravel-websockets[1.11.0, ..., 1.13.0] require guzzlehttp/psr7 ^1.5 -> found guzzlehttp/psr7[1.5.0, ..., 1.9.1] but the package is fixed to 2.5.0 (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.
    - beyondcode/laravel-websockets[1.13.1, ..., 1.13.2] require illuminate/broadcasting ^6.0|^7.0|^8.0|^9.0 -> found illuminate/broadcasting[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.9] but these were not loaded, likely because it conflicts with another require.
    - react/http[v1.1.0, ..., v1.9.0] require psr/http-message ^1.0 -> found psr/http-message[1.0, 1.0.1, 1.1] but the package is fixed to 2.0 (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 beyondcode/laravel-websockets * -> satisfiable by beyondcode/laravel-websockets[1.0.0, ..., 1.14.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require beyondcode/laravel-websockets:*" to figure out if any version is installable, or "composer require beyondcode/laravel-websockets:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

我的系统上安装了PHP 8.2.6版本。看起来这个包需要较低版本的PHP和一些特定版本的其他依赖项。有没有办法在PHP 8.2.6版本中安装beyondcode/laravel-websockets包?如果没有,是否有任何替代解决方案或变通办法?我感谢任何帮助或指导。谢谢你!

4ngedf3f

4ngedf3f1#

我认为你正面临着beyondCode laravel websocket包的版本问题,我在搜索后遇到了同样的问题,我发现了这个YouTube视频,它解释了如何在laravel 10上安装beyondcode laravel web socket。

composer require beyondcode/laravel-websockets -w

https://youtu.be/8RL584c7EsI

相关问题