无法安装背包类型器。拉拉维尔版本 7.10



我有一个新安装的Laravel 7.10。*我想安装背包composer require backpack/generators --dev,但无法安装发电机。这是错误。

您的需求无法解析为一组可安装的软件包。

问题1

  • laravel/framework的安装请求(锁定在v7.10.3,需要^7.0(->可由laravel/framework[v7.10.3]满足
  • 背包/发电机的安装请求^3.0->可通过backck/generator[3.0.0,v3.0.1,v3.x-dev]满足
  • 只能安装其中一个:backpack/crud[4.1.x-dev,4.0.61]
  • 只能安装其中一个:backpack/crud[4.1.x-dev,4.0.61]
  • 只能安装其中一个:backpack/crud[4.1.x-dev,4.0.61]
  • 结论:安装backpack/crud 4.1.x-dev
  • 背包/积垢的安装请求(锁定在4.0.61,要求为4.*(->背包/原油可满足[4.061]`

安装失败,正在还原/composer.json的原始内容。

这是我的composer.json

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"backpack/crud": "4.0.*",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}

问题是您将backpack/crud版本锁定为4.0.*,但对于backpack/generators,可满足的版本是:4.1.0, 4.1.1, 4.1.x-dev

所以你应该在composer.json:中更改这一行

"backpack/crud": "4.0.*",

到此:

"backpack/crud": "4.1.*",

然后更新composer包:

composer update

最后安装发电机包:

composer require backpack/generators --dev

相关内容

  • 没有找到相关文章

最新更新