猿问

无法使用 Laravel 6.9 安装依赖项

我正在尝试通过执行以下操作从 https://github.com/barryvdh/laravel-debugbar安装barryvdh/laravel-debugbar:


composer require barryvdh/laravel-debugbar --dev

我收到这些错误:


c:\wamp64\www\blog>php artisan --version

Laravel Framework 6.9.0


c:\wamp64\www\blog>composer require barryvdh/laravel-debugbar --dev

Using version ^3.2 for barryvdh/laravel-debugbar

./composer.json has been updated

Loading composer repositories with package information

Updating dependencies (including require-dev)

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


  Problem 1

    - Conclusion: remove laravel/framework v6.9.0

    - Conclusion: don't install laravel/framework v6.9.0

Installation failed, reverting ./composer.json to its original content.

如何解决这个错误?


饮歌长啸
浏览 80回答 2
2回答

米琪卡哇伊

从您的composer.json文件中删除way/generators并运行composer update"require-dev": {&nbsp; &nbsp; .....&nbsp; &nbsp; "way/generators": "~2.0"", // <-- remove this line}way/generators适用于Laravel 4.2 及以下版本,您正在使用Laravel ^6.9有用的链接: https ://packagist.org/packages/way/generators

慕妹3242003

由于此包方式/生成器,您收到错误删除文件中的方式/生成器composer.json在这里阅读:https ://github.com/JeffreyWay/Laravel-4-GeneratorsLaravel 4.2 及以下要通过 Composer 安装这个包,你可以用这种方式编辑你的 Composer.json 文件"require-dev":&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;"way/generators":&nbsp;"~2.0"}拉拉维尔 5+如果您使用的是 Laravel 5 +,请改用这个包。解决方案:您当前使用的是Laravel 6.9,因此请使用此包:https ://github.com/laracasts/Laravel-5-Generators-Extended
随时随地看视频慕课网APP
我要回答