Your requirements could not be resolved to an installable set of packages.

8 篇文章 0 订阅
0 篇文章 0 订阅

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

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for doctrine/annotations v1.6.0 -> satisfiable by doc                                          trine/annotations[v1.6.0].
    - doctrine/annotations v1.6.0 requires php ^7.1 -> your PHP version (7.0.12)                                           does not satisfy that requirement.
  Problem 2
    - Installation request for doctrine/cache v1.7.1 -> satisfiable by doctrine/                                          cache[v1.7.1].
    - doctrine/cache v1.7.1 requires php ~7.1 -> your PHP version (7.0.12) does                                           not satisfy that requirement.
  Problem 3
    - Installation request for doctrine/collections v1.5.0 -> satisfiable by doc                                          trine/collections[v1.5.0].
    - doctrine/collections v1.5.0 requires php ^7.1 -> your PHP version (7.0.12)                                           does not satisfy that requirement.
  Problem 4
    - Installation request for doctrine/common v2.8.1 -> satisfiable by doctrine                                          /common[v2.8.1].
    - doctrine/common v2.8.1 requires php ~7.1 -> your PHP version (7.0.12) does                                           not satisfy that requirement.
  Problem 5
    - Installation request for doctrine/dbal v2.7.1 -> satisfiable by doctrine/d                                          bal[v2.7.1].
    - doctrine/dbal v2.7.1 requires php ^7.1 -> your PHP version (7.0.12) does n                                          ot satisfy that requirement.
  Problem 6
    - Installation request for doctrine/inflector v1.3.0 -> satisfiable by doctr                                          ine/inflector[v1.3.0].
    - doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.12) d                                          oes not satisfy that requirement.
  Problem 7
    - Installation request for symfony/css-selector v4.1.0 -> satisfiable by sym                                          fony/css-selector[v4.1.0].
    - symfony/css-selector v4.1.0 requires php ^7.1.3 -> your PHP version (7.0.1                                          2) does not satisfy that requirement.
  Problem 8
    - Installation request for symfony/event-dispatcher v4.1.0 -> satisfiable by                                           symfony/event-dispatcher[v4.1.0].
    - symfony/event-dispatcher v4.1.0 requires php ^7.1.3 -> your PHP version (7                                          .0.12) does not satisfy that requirement.
  Problem 9
    - Installation request for symfony/translation v4.1.0 -> satisfiable by symf                                          ony/translation[v4.1.0].
    - symfony/translation v4.1.0 requires php ^7.1.3 -> your PHP version (7.0.12                                          ) does not satisfy that requirement.
  Problem 10
    - Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doc                                          trine/instantiator[1.1.0].
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.12)                                           does not satisfy that requirement.
  Problem 11
    - Installation request for myclabs/deep-copy 1.8.1 -> satisfiable by myclabs                                          /deep-copy[1.8.1].
    - myclabs/deep-copy 1.8.1 requires php ^7.1 -> your PHP version (7.0.12) doe                                          s not satisfy that requirement.
  Problem 12
    - doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.12) d                                          oes not satisfy that requirement.
    - laravel/framework v5.5.40 requires doctrine/inflector ~1.1 -> satisfiable                                           by doctrine/inflector[v1.3.0].
    - Installation request for laravel/framework v5.5.40 -> satisfiable by larav                                          el/framework[v5.5.40].

查看了下资料说是php版本不符,打开composer.json发现代码只要求大于7.0.0可仍然报这个错误,不用太较真执行如下代码之后在运行之前的代码就ok

composer install --ignore-platform-reqs 或者 composer update --ignore-platform-reqs
  • 3
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值