执行composer install遇到错误:Your requirements could not be resolved to an installable set of packages. 这是因为不匹配composer.json要求的版本。
D:\code\php\basecode\test\api_basecode> composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- laravel/horizon is locked to version v3.7.2 and an update of this package was not requested.
- laravel/horizon v3.7.2 requires ext-pcntl * -> it is missing from your system. Install or enable PHP's pcntl extension.
Problem 2
- mongodb/mongodb is locked to version 1.6.1 and an update of this package was not requested.
- mongodb/mongodb 1.6.1 requires ext-mongodb ^1.7 -> it is missing from your system. Install or enable PHP's mongodb extension.
Problem 3
- mongodb/mongodb 1.6.1 requires ext-mongodb ^1.7 -> it is missing from your system. Install or enable PHP's mongodb extension.
- jenssegers/mongodb v3.6.4 requires mongodb/mongodb ^1.4 -> satisfiable by mongodb/mongodb[1.6.1].
- jenssegers/mongodb is locked to version v3.6.4 and an update of this package was not requested.
To enable extensions, verify that they are enabled in your .ini files:
- D:\BtSoft\php\74\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
提示我的PHP 7版本太高,不符合composer.json需要的版本,但是在PHP 7下应该也是可以运行的,composer可以设置忽略版本匹配,命令是:
$ composer install --ignore-platform-reqs
或者
$ composer update --ignore-platform-reqs
|