当我尝试从5.4更新Laravel 5.5时,它是显示错误。
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0",
"intervention/image": "^2.4",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"scripts": {
"post-root-package-install": [
"php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\Foundation\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\Foundation\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
这是我的composer.json文件。当我使用命令 Composer Update 时,这是Show。
Problem 1
- This package requires php >=7.0 but your PHP version (5.6.25) does not satisfy that requirement.
Problem 2
- Installation request for laravel/framework 5.5.* -> satisfiable by laravel/framework[v5.5.0].
- laravel/framework v5.5.0 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
Problem 3
- phpunit/phpunit 6.3.0 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.4 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.3 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.2 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.1 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.0 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.4 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.3 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.2 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.1 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.0 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.9 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.8 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.7 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.6 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.5 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.4 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.3 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.2 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.13 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.12 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.11 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.10 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.1 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.0 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- Installation request for phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, 6.0.1, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.
2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.3.0].
我的PHP版本是7.0.10,我使用Wamp。
您的PHP版本为5.6
This package requires php >=7.0 but your PHP version (5.6.25) does not satisfy that requirement.
因此,将您的PHP版本更改为PHP 7.0并运行:
composer install
我过去遇到了类似的问题。或在Laravel上创建路由以显示PHP版本。它将确认问题是什么。
您需要删除composer.lock
文件&再次运行composer install
尝试作曲家安装-ignore-platform-reqs