source

오류 "root composer.json에 php ^7.3이 필요하지만 사용 중인 php 버전(8.0.0)이 해당 요구 사항을 충족하지 못합니다."

manysource 2022. 12. 24. 17:45

오류 "root composer.json에 php ^7.3이 필요하지만 사용 중인 php 버전(8.0.0)이 해당 요구 사항을 충족하지 못합니다."

실행 중 비정상적인 오류가 발생하였습니다.composer install명령어를 입력합니다.

PHP 8.0.0을 사용하는 동안 PHP 7.3이 필요합니다.이 질문은 ComposerPHP base 의존성 덮어쓰기와는 다릅니다.필요보다 높은 버전의 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 install --ignore-platform-reqs

composer.json 파일의 프로젝트에는 다음이 포함되어 있기 때문입니다.

"require": {
    "php": ">=7.3",
    .....
},

이 요건을 다음과 같이 갱신해 주세요.

"require": {
    "php": "^7.3|^8.0",
    .....
},

언급URL : https://stackoverflow.com/questions/65454412/error-root-composer-json-requires-php-7-3-but-your-php-version-8-0-0-does-no