You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Laravel项目配置Google Drive备份遇Composer依赖冲突问题求助

解决Spatie Laravel Backup配置Google Drive时的Composer依赖冲突问题

错误原因

  • 你指定安装的nao-pon/flysystem-google-drive ~1.1系列版本,依赖的是league/flysystem ~1.0版本;但你的项目中league/flysystem已被锁定为3.14.0版本,两者版本不兼容,导致Composer无法完成安装。

解决方案

方案1:允许Composer自动调整依赖版本

运行以下命令,使用-W参数让Composer允许升级、降级或移除锁定版本的依赖,自动满足适配器的版本要求:

composer require nao-pon/flysystem-google-drive ~1.1 -W

方案2:使用兼容Flysystem 3.x的适配器版本

nao-pon/flysystem-google-drive的1.x版本仅支持Flysystem 1.x,若不想降级Flysystem,可安装支持Flysystem 3.x的分支版本:

composer require nao-pon/flysystem-google-drive:~3.0

方案3:手动指定依赖版本(谨慎使用)

若需精确控制版本,可手动将league/flysystem降级到1.x系列(注意:这可能影响其他依赖该包的Laravel组件):

composer require league/flysystem:~1.1 nao-pon/flysystem-google-drive:~1.1

内容的提问来源于stack exchange,提问作者Almas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.23 15:45:08