执行composer install遇到错误:Your requirements could not be resolved to an installable set of packages. 这是因为不匹配composer.json要求的版本。

$ composer install
 
Your requirements could not be resolved to an installable set of packages.
 
  Problem 1
    - laravel-notification-channels/webpush 3.0.0 requires minishlink/web-push ^2.0 -> satisfiable by minishlink/web-push[v2.0.0, v2.0.1].
    - laravel-notification-channels/webpush 3.0.1 requires minishlink/web-push ^2.0 -> satisfiable by minishlink/web-push[v2.0.0, v2.0.1].
    - minishlink/web-push v2.0.0 requires mdanter/ecc ^0.5.0 -> satisfiable by mdanter/ecc[v0.5.0, v0.5.1, v0.5.2].
    - minishlink/web-push v2.0.1 requires mdanter/ecc ^0.5.0 -> satisfiable by mdanter/ecc[v0.5.0, v0.5.1, v0.5.2].
    - mdanter/ecc v0.5.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - mdanter/ecc v0.5.1 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - mdanter/ecc v0.5.0 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - Installation request for laravel-notification-channels/webpush ^3.0 -> satisfiable by laravel-notification-channels/webpush[3.0.0, 3.0.1].
 
  To enable extensions, verify that they are enabled in your .ini files:
    - /usr/local/php7.2.9/etc/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

 

Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐