服务器正在使用默认的php版本5.6,我需要7.1,所以我最近安装了7.1版本。当我运行命令php -v
时显示php 5.6,因此我使用echo 'alias php="/opt/cpanel/ea-php71/root/usr/bin/php"' >> ~/.bashrc
更改了别名,它成功了,因为现在显示的是php 7.1.32(cli)。但是我仍然不能使用ssh在CentOS服务器中运行composer install
,并且显示错误
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php ^7.1.3 but your PHP version (5.6.40) does not satisfy that requirement.
Problem 2
- beyondcode/laravel-dump-server 1.3.0 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- beyondcode/laravel-dump-server 1.2.2 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- beyondcode/laravel-dump-server 1.2.1 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- beyondcode/laravel-dump-server 1.2.0 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- beyondcode/laravel-dump-server 1.1.3 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- beyondcode/laravel-dump-server 1.1.2 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- beyondcode/laravel-dump-server 1.1.1 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- beyondcode/laravel-dump-server 1.1.0 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- beyondcode/laravel-dump-server 1.0.0 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- beyondcode/laravel-dump-server 1.3.0 requires php ^7.1 -> your PHP version (5.6.40) does not satisfy that requirement.
- Installation request for beyondcode/laravel-dump-server ^1.0 -> satisfiable by beyondcode/laravel-dump-server[1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.2.1, 1.2.2, 1.3.0].