提问者:小点点

Laravel[duplicate]中的Composer Update错误“无法将需求解析为可安装的软件包集”


我刚刚更新了我的Composer,它返回时出现了一些错误和问题:

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

Problem 1

- jeremykenedy/laravel-roles v1.2.0 requires laravel/framework 5.3.*|5.4.*|5.5.*|5.6.* -> found 
laravel/framework[v5.3.0-RC1, ..., 5.6.x-dev] but it conflicts with your root composer.json require 
(^8.0).

- jeremykenedy/laravel-roles v1.3.0 requires laravel/framework 5.3.*|5.4.*|5.5.*|5.6.*|5.7.* -> found 
laravel/framework[v5.3.0-RC1, ..., 5.7.x-dev] but it conflicts with your root composer.json require 
(^8.0).

- jeremykenedy/laravel-roles[v1.4.0, ..., v1.7.0] require laravel/framework 
5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.* -> found laravel/framework[v5.3.0-RC1, ..., 5.8.x-dev] but it 
conflicts with your root composer.json require (^8.0).

- Root composer.json requires jeremykenedy/laravel-roles ^1.2 -> satisfiable by jeremykenedy/laravel- 
roles[v1.2.0, ..., v1.7.0].

我在谷歌上搜索,但没能解决我的问题。请给我一个清晰的答案,这样我就能解决我的错误了。谢谢兄弟的帮助。

执行后

composer install --ignore-platform-reqs

也会出现以下错误:

类App\Http\Controller\riderOrders位于L:/Live/Cyber-Food-fiji/app\Http\Controller\RiderOrders.php不符合psr-4自动加载标准。跳过。

未找到类“Grimzy\LaravelMysqlSpatial\SpatialServiceProvider”

Script@php artisan package:discover处理返回的自动加载后转储事件,错误代码为1

作曲家更新执行后

无法将您的需求解析为可安装的软件包集。

问题1

- pusher/pusher-php-server[v3.2.0, ..., v3.3.1] require php ^5.4 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
- pusher/pusher-php-server v3.4.0 requires php >=5.4 <7.3 -> your php version (8.0.0) does not satisfy that requirement.
- pusher/pusher-php-server v3.4.1 requires php >=5.4 <7.4 -> your php version (8.0.0) does not satisfy that requirement.
- Root composer.json requires pusher/pusher-php-server ^3.2 -> satisfiable by pusher/pusher-php-server[v3.2.0, ..., v3.4.1].

谢谢你帮我解决最后一个bug。Plz在上述错误中也有指导作用。谢谢


共1个答案

匿名用户

运行以下命令:

composer install --ignore-platform-reqs

composer update --ignore-platform-reqs

注:

--忽略平台要求:忽略所有平台要求(php、hhvm、lib-*和ext-),并强制安装,即使本地计算机无法满足这些要求。另请参见平台配置选项--ignore platform req:忽略特定的平台需求(php、hhvm、lib-和ext-*)并强制安装,即使本地计算机没有满足它。