前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >requires php ~7.1 -> your PHP version (7.0.18) does not satisfy that requirement

requires php ~7.1 -> your PHP version (7.0.18) does not satisfy that requirement

作者头像
全栈程序员站长
发布2022-07-07 11:24:14
3590
发布2022-07-07 11:24:14
举报
文章被收录于专栏:全栈程序员必看

一个大兄弟本地用了 PHP 7.1 进行开发,而我本地是 PHP 7.0, 于是悲剧发生了。

composer install 之后报错

代码语言:javascript
复制
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.5.0 -> satisfiable by doctrine/annotations[v1.5.0].
    - doctrine/annotations v1.5.0 requires php ^7.1 -> your PHP version (7.0.18) 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.18) does not satisfy that requirement.
  Problem 3
    - Installation request for doctrine/collections v1.5.0 -> satisfiable by doctrine/collections[v1.5.0].
    - doctrine/collections v1.5.0 requires php ^7.1 -> your PHP version (7.0.18) 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.18) does not satisfy that requirement.
  Problem 5
    - Installation request for doctrine/dbal v2.6.2 -> satisfiable by doctrine/dbal[v2.6.2].
    - doctrine/dbal v2.6.2 requires php ^7.1 -> your PHP version (7.0.18) does not satisfy that requirement.
  Problem 6
    - Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0].
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.18) does not satisfy that requirement.
  Problem 7
    - doctrine/annotations v1.5.0 requires php ^7.1 -> your PHP version (7.0.18) does not satisfy that requirement.
    - doctrine/dbal v2.6.2 requires php ^7.1 -> your PHP version (7.0.18) does not satisfy that requirement.
    - doctrine/dbal 2.5.x-dev requires doctrine/common >=2.4,<2.8-dev -> satisfiable by doctrine/common[2.7.x-dev].
    - backpack/crud 3.2.21 requires doctrine/dbal ^2.5 -> satisfiable by doctrine/dbal[2.5.x-dev, v2.6.2].
    - doctrine/common 2.7.x-dev requires doctrine/annotations 1.* -> satisfiable by doctrine/annotations[v1.5.0].
    - Installation request for backpack/crud 3.2.21 -> satisfiable by backpack/crud[3.2.21].

解决方法是

删除 composer.lock 文件,重新执行 composer install,这样就能重新生成 composer.lock 文件了。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/113306.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021年10月,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档