Composer无法升级包locked at问题的解决

在CRMEB项目上,想安装新的包,运行:

composer require yansongda/pay -vvv

出现提示

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

  Problem 1
    - The requested package overtrue/wechat (locked at 3.3.33, required as ^4.2.33) is satisfiable by overtrue/wechat[3.3.33] but these conflict with your requirements or minimum-stability.
  Problem 2
    - The requested package symfony/event-dispatcher (locked at v2.8.52, required as ^5.2) is satisfiable by symfony/event-dispatcher[v2.8.52] but these conflict with your requirements or minimum-stability.

想升级overtrue/wechat

composer update overtrue/wechat

出现提示

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

  Problem 1
    - The requested package symfony/event-dispatcher (locked at v2.8.52, required as ^5.2) is satisfiable by symfony/event-dispatcher[v2.8.52] but these conflict with your requirements or minimum-stability.

根据提示,又想升级symfony/event-dispatcher

composer update symfony/event-dispatcher

又出现提示:

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

  Problem 1
    - The requested package overtrue/wechat (locked at 3.3.33, required as ^4.2.33) is satisfiable by overtrue/wechat[3.3.33] but these conflict with your requirements or minimum-stability.

两个包死咬在一起,无法升级,想删除之后重新引入

composer remove overtrue/wechat

出现提示

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

  Problem 1
    - The requested package symfony/event-dispatcher (locked at v2.8.52, required as ^5.2) is satisfiable by symfony/event-dispatcher[v2.8.52] but these conflict with your requirements or minimum-stability.

死循环,两个死都要咬在一起,咋办捏?

解决办法,先把旧的彻底删除掉,然后重新安装组件

composer remove overtrue/wechat symfony/event-dispatcher --update-no-dev

注意的是,在remove的时候使用 --update-no-dev这个参数就可以了,具体原因未详细了解,将来有时间再看,重点就是这个参数了

另外使用composer remove掉的组件,有可能需要手工删除composer.lock和vendor/composer/installed.json文件中的相应内容,然后安装组件时,才可以安装新版本的组件

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值