在我的laravel项目中安装websocket时,我遇到了一个composer错误。我的意图是安装这个websocket并将其用于实时通知,但在发出安装命令后,我遇到了一个错误。下面是我面临的问题:
Problem 1
- Conclusion: don't install beyondcode/laravel-websockets 1.12.0
- Conclusion: remove guzzlehttp/psr7 2.1.0
- Installation request for beyondcode/laravel-websockets ^1.12 -> satisfiable by beyondcode/laravel-websockets[1.12.0, 1.x-dev].
- Conclusion: don't install guzzlehttp/psr7 2.1.0
- beyondcode/laravel-websockets 1.x-dev requires guzzlehttp/psr7 ^1.5 -> satisfiable by guzzlehttp/psr7[1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.x-dev].
- Can only install one of: guzzlehttp/psr7[1.7.0, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.8.0, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.8.1, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.8.2, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.8.3, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.x-dev, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.5.0, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.5.1, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.5.2, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.6.0, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.6.1, 2.1.0].
- Installation request for guzzlehttp/psr7 (locked at 2.1.0) -> satisfiable by guzzlehttp/psr7[2.1.0].
安装失败,正在还原/composer.json的原始内容。
有人能帮我解决这个问题吗。。
降级guzzlehttp://guzzle版本
在composer.json中进行更改这些是根据Laravel 8和PHP 8.0
尝试降级或升级,直到它开始工作。
"php":"7.3|^8.0";,
"beyondcode/laravel-websockets":"1.12";
"guzzlehttp://guzzle":"7.0.1〃
"laravel/framework":"8.40〃;,