requires xxx -> found xxx but it conflicts with xxx 的解决办法

laravel 5.7发送邮件,根据官方文档安装报错:

yjl@fibocom:/opt/redmine-4.1.1-0/apps/redminel/htdocs$ composer require guzzlehttp/guzzle
...

  Problem 1
    - laravel/slack-notification-channel v1.0.3 requires guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.3).
    - laravel/framework v5.7.29 requires laravel/slack-notification-channel ^1.0 -> satisfiable by laravel/slack-notification-channel[v1.0.3].
    - laravel/framework is locked to version v5.7.29 and an update of this package was not requested.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

根据laravel-ide-helper报错Your requirements could not be resolved to an installable set of packages.文章解决方案,猜想可能是安装的版本与composer.json中不匹配导致。

查看 laravel/slack-notification-channel  包 和 guzzlehttp/guzzle 包发现,默认安装的 guzzlehttp/guzzle 版本是7.3.0 ,而 laravel/slack-notification-channel 中 guzzlehttp/guzzle: ^6.0,意思是  laravel/slack-notification-channel 需要的guzzlehttp/guzzle需要在6.0—7.0之间,所以降低安装的guzzlehttp/guzzle版本,安装成功

composer  require guzzlehttp/guzzle v6.5.5

 

yjl@fibocom:/opt/redmine-4.1.1-0/apps/redminel/htdocs$ composer  require guzzlehttp/guzzle v6.5.5
...
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: fideloper/proxy
Discovered Package: laravel/nexmo-notification-channel
Discovered Package: laravel/slack-notification-channel
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
56 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值