我正在尝试将 laravel backpack 升级到 v3.4.0 指导this document.
当前这个 laravel 版本是 5.7.x.(是的,它确实是过时的项目)。
在第9步说运行
php artisan backpack:base:install
,当运行这个命令时会出现这个错误:
The command "composer require laracasts/generators:dev-master --dev" failed.
Exit Code: 2(Misuse of shell builtins)
Working directory: /home/user/php/laravel/
Output:
================
Error Output:
================
./composer.json has been updated
Running composer update laracasts/generators
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires laracasts/generators dev-master -> satisfiable by l
aracasts/generators[dev-master].
- laracasts/generators dev-master requires illuminate/support ~6.0|~7.0|~8.0|~9.0
|^10.0 -> found illuminate/support[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.
0, ..., v8.83.27, v9.0.0, ..., v9.52.7, v10.0.0, ..., v10.9.0] but these were not loa
ded, likely because it conflicts with another require.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removal
s for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original
content.
总而言之,laracasts/generators 依赖于未加载的 illuminate/support v6.0.0 - v10.9.0。
我该如何解决这个冲突?
如错误所述:我尝试使用
-W
选项运行此命令,即:composer require laracasts/generators:dev-master --dev -W
并且发生了同样的错误:
- Root composer.json requires laracasts/generators dev-master -> satisfiable by laracasts/generators[dev-master].
- laracasts/generators dev-master requires illuminate/support ~6.0|~7.0|~8.0|~9.0|^10.0 -> found illuminate/support[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.7, v10.0.0, ..., v10.9.0] but these were not loaded, likely because it conflicts with another require.
`