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

Laravel 8.9.0安装laravel/ui:^2.4时依赖冲突报错求助

Fixing Laravel UI Dependency Conflict with Laravel 8.9.0

Hey there, I see exactly what's going on here—this is a classic version compatibility conflict between Laravel Framework and the laravel/ui package. Let's break it down and fix it quickly:

Why This Error Happens

You're trying to install laravel/ui:^2.4, which is built exclusively for Laravel 7.x. This package requires illuminate/filesystem ^7.0, but your Laravel 8.9.0 project relies on the 8.x version of that core component. Composer can't install conflicting major versions of the same dependency at once, hence the "无法解析可安装的包集合" error.

The Fixes

You have two straightforward, reliable options to resolve this:

  1. Install the Laravel 8-compatible version of laravel/ui
    Run this command instead—it targets the 3.x branch of laravel/ui, which is explicitly designed for Laravel 8:

    composer require laravel/ui:^3.0
    
  2. Let Composer auto-select the correct version
    If you omit the version constraint entirely, Composer will automatically detect your Laravel 8.9.0 installation and pick the latest compatible version of laravel/ui:

    composer require laravel/ui
    

Quick Version Reference (For Future Projects)

To avoid this issue down the line, keep this compatibility mapping in mind:

  • Laravel 7.x → laravel/ui 2.x
  • Laravel 8.x → laravel/ui 3.x
  • Laravel 9.x+ → laravel/ui 4.x and above

Your original error details for context:
问题1

  • 安装请求laravel/ui 2.4 -> 可由laravel/ui[v2.4.0]满足。
  • 结论:移除laravel/framework v8.9.0
  • 结论:不要安装laravel/framework v8.9.0
  • laravel/ui v2.4.0要求illuminate/filesystem ^7.0 -> 可由illuminate/filesystem[7.x-dev, v7.0.0等7.x系列版本]满足。
  • 无法同时安装illuminate/filesystem 7.x-dev与laravel/framework v8.9.0

内容的提问来源于stack exchange,提问作者B L Praveen

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.09 15:07:49