laravel scout 出现此错误:无法将您的要求解析为一组可安装的软件包
I am getting this error with laravel scout: Your requirements could not be resolved to an installable set of packages
我在安装 Laravel Scout 时遇到此错误:
问题 1
- laravel/scout[v9.1.0, ..., 9.x-dev] 需要 illuminate/bus ^8.0 -> 找到 illuminate/bus[v8.0.0, ..., 8.x-dev] 但是这些没有加载,可能是因为它与另一个要求冲突。
- 根 composer.json 需要 laravel/scout ^9.1 -> laravel/scout[v9.1.0, 9.x-dev].
可满足
使用选项 --with-all-dependencies (-W) 允许升级、降级和删除当前锁定到特定版本的包。
这是我的 composer.json 文件:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"laravel/framework": "^7.29",
"laravel/tinker": "^2.5",
"laravel/ui": "^2.4"
},
"require-dev": {
"facade/ignition": "^2.0",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.3",
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"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"
]
}
}
在你的作曲家你有 "laravel/framework": "^7.29",
相当于 >=7.29 <8.0.0
但你需要 illuminate/bus[v8.0.0, ..., 8.x-dev]
它是 laravel/framework >=8.0.0
的一部分
因此,您无法安装laravel scount version >= 9.0
尝试使用以下命令安装与 laravel 7.x 兼容的 8.6.1 版:
composer require "laravel/scout:^8.6.1"
我在安装 Laravel Scout 时遇到此错误:
问题 1 - laravel/scout[v9.1.0, ..., 9.x-dev] 需要 illuminate/bus ^8.0 -> 找到 illuminate/bus[v8.0.0, ..., 8.x-dev] 但是这些没有加载,可能是因为它与另一个要求冲突。 - 根 composer.json 需要 laravel/scout ^9.1 -> laravel/scout[v9.1.0, 9.x-dev].
可满足使用选项 --with-all-dependencies (-W) 允许升级、降级和删除当前锁定到特定版本的包。
这是我的 composer.json 文件:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"laravel/framework": "^7.29",
"laravel/tinker": "^2.5",
"laravel/ui": "^2.4"
},
"require-dev": {
"facade/ignition": "^2.0",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.3",
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"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"
]
}
}
在你的作曲家你有 "laravel/framework": "^7.29",
相当于 >=7.29 <8.0.0
但你需要 illuminate/bus[v8.0.0, ..., 8.x-dev]
它是 laravel/framework >=8.0.0
因此,您无法安装laravel scount version >= 9.0
尝试使用以下命令安装与 laravel 7.x 兼容的 8.6.1 版:
composer require "laravel/scout:^8.6.1"