Root composer.json需要php^7.3,但您的php版本(8.0.0)不满足该要求
运行Root composer.json需要php^7.3,但您的php版本(8.0.0)不满足该要求,php,laravel,Php,Laravel,运行composer安装命令时出现异常错误。它需要PHP7.3,而我有PHP8.0.0。这个静默与其他版本不同,因为我的PHP(8.0.0)版本比要求的要高,我只是想知道它为什么不工作 Problem 1 - Root composer.json requires php ^7.3 but your php version (8.0.0) does not satisfy that requirement. Problem 2 - asm89/stack-cors
composer安装
命令时出现异常错误。它需要PHP7.3,而我有PHP8.0.0。这个静默与其他版本不同,因为我的PHP(8.0.0)版本比要求的要高,我只是想知道它为什么不工作
Problem 1
- Root composer.json requires php ^7.3 but your php version (8.0.0) does not satisfy that requirement. Problem 2
- asm89/stack-cors is locked to version v2.0.1 and an update of this package was not requested.
- asm89/stack-cors v2.0.1 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement. Problem 3
- laravel/framework is locked to version v8.10.0 and an update of this package was not requested.
- laravel/framework v8.10.0 requires php ^7.3 -> your php version (8.0.0) does not satisfy that requirement. Problem 4
- laravel/tinker is locked to version v2.4.2 and an update of this package was not requested.
- laravel/tinker v2.4.2 requires php ^7.2 -> your php version (8.0.0) does not satisfy that requirement. Problem 5
- facade/flare-client-php is locked to version 1.3.6 and an update of this package was not requested.
- facade/flare-client-php 1.3.6 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement. Problem 6
- facade/ignition is locked to version 2.4.1 and an update of this package was not requested.
- facade/ignition 2.4.1 requires php ^7.2.5 -> your php version (8.0.0) does not satisfy that requirement. Problem 7
- fzaninotto/faker is locked to version v1.9.1 and an update of this package was not requested.
- fzaninotto/faker v1.9.1 requires php ^5.3.3 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement. Problem 8
- nunomaduro/collision is locked to version v5.0.2 and an update of this package was not requested.
- nunomaduro/collision v5.0.2 requires php ^7.3 -> your php version (8.0.0) does not satisfy that requirement. Problem 9
- asm89/stack-cors v2.0.1 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
- fruitcake/laravel-cors v2.0.2 requires asm89/stack-cors ^2.0.1 -> satisfiable by asm89/stack-cors[v2.0.1].
- fruitcake/laravel-cors is locked to version v2.0.2 and an update of this package was not requested.
这是因为在composer.json文件中的项目中,您有:
"require": {
"php": ">=7.3",
.....
},
尝试将此要求更新为:
"require": {
"php": "^7.3|^8.0",
.....
},
我的问题与此不同,因为我的版本比要求的版本高。是的,但您也可以模拟回答中提到的平台。^7.3表示版本7.3.0或更高版本。但是,它与版本8或更高版本不兼容,具体取决于。你通过docker工作吗?这意味着您的容器具有所需的php版本。如果您在更新之外尝试,并且您的操作系统的php版本更高,那么您将得到此警告。解决此问题的一种方法是使用标志--ignore-platform-reqs运行编写器更新。应使用双管而不是单管。单一的方法仍然有效,但只适用于子孙后代:这不是解决这一问题的适当方法。它不起作用。你可以从这里看到代码和错误我不同意。。。您有:gabrielbull/ups api 0.8.0需要php^5.5 | | ^7.0->您的php版本(8.0.1)不满足该要求。因此,您必须使用php解释器版本5.5或7.0及以上。但是你有8.0.1。因此,首先,您必须将包gabrielbull/ups api更新到1.2.0版或更高版本,这对我不起作用!仍然获得相同的输出。
composer安装--忽略平台需求