在我执行时php -v,它说它有php7
但是当我尝试执行时 composer update
它的回应
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php >=7.0.0 but your PHP version (5.6.33) does not satisfy that requirement.
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?注意:我不允许卸载以前版本的php
这是composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"fideloper/proxy": "~3.3",
"intervention/image": "^2.4",
"laravel/framework": "5.5.*",
"laravel/passport": "^v1",
"laravel/tinker": "~1.0"
},
"require-dev": {
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.0"
}, …Run Code Online (Sandbox Code Playgroud) 这是我打开网站时的实际错误
实际上,我已经成功运行php artisan migrate:refresh,并且没有错误。
已经尝试了以下命令。
php artisan cache:clear
php artisan config:clear
composer install
composer clearcache
composer dump-autoload
php artisan clear-compiled
Run Code Online (Sandbox Code Playgroud)
我还检查了pdo是否已安装,是否php -m已经安装
我正在使用CentOS。