composer requireIllumination/support 会给出一个错误,例如“您的需求无法解析为一组可安装的软件包”。

Posted

技术标签:

【中文标题】composer requireIllumination/support 会给出一个错误,例如“您的需求无法解析为一组可安装的软件包”。【英文标题】:composer require illuminate/support gives an error like "Your requirements could not be resolved to an installable set of packages." 【发布时间】:2020-10-27 18:01:52 【问题描述】:

我正在使用 laravel 6.18... 我需要安装包“作曲家需要照明/支持”,但有些错误。我需要安装包“作曲家需要照明/支持”,但有些错误。我需要安装包“作曲家需要照明/支持”但有些是怎么出错的。

我的错误

A composer dependency is missing

You might be missing a composer dependency. A possible package that was found is illuminate/support.

See if this is the package that you need and install it via composer require illuminate/support.

下面是错误

Problem 1
- Conclusion: don't install illuminate/support v7.18.0
- Conclusion: don't install illuminate/support 7.x-dev
- Can only install one of: laravel/framework[7.x-dev, 6.x-dev].
- Can only install one of: laravel/framework[v6.10.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.10.1, 7.x-dev].
- Can only install one of: laravel/framework[v6.11.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.12.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.13.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.13.1, 7.x-dev].
- Can only install one of: laravel/framework[v6.14.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.15.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.15.1, 7.x-dev].
- Can only install one of: laravel/framework[v6.16.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.17.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.17.1, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.1, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.10, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.11, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.12, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.13, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.14, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.15, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.16, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.17, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.18, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.19, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.2, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.20, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.21, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.22, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.23, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.3, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.4, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.5, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.6, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.7, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.8, 7.x-dev].
- Can only install one of: laravel/framework[v6.18.9, 7.x-dev].
- Can only install one of: laravel/framework[v6.3.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.4.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.4.1, 7.x-dev].
- Can only install one of: laravel/framework[v6.5.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.5.1, 7.x-dev].
- Can only install one of: laravel/framework[v6.5.2, 7.x-dev].
- Can only install one of: laravel/framework[v6.6.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.6.1, 7.x-dev].
- Can only install one of: laravel/framework[v6.6.2, 7.x-dev].
- Can only install one of: laravel/framework[v6.7.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.8.0, 7.x-dev].
- Can only install one of: laravel/framework[v6.9.0, 7.x-dev].
- Can only install one of: laravel/framework[7.x-dev, v6.18.23].
- Can only install one of: laravel/framework[7.x-dev, v6.18.23].
- Installation request for illuminate/support ^7.18 -> satisfiable by illuminate/support[7.x-dev, v7.18.0], laravel/framework[7.x-dev].
- Installation request for laravel/framework ^6.3 -> satisfiable by laravel/framework[6.x-dev, v6.10.0, v6.10.1, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.10, v6.18.11, v6.18.12, v6.18.13, v6.18.14, v6.18.15, v6.18.16, v6.18.17, v6.18.18, v6.18.19, v6.18.2, v6.18.20, v6.18.21, v6.18.22, v6.18.23, v6.18.3, v6.18.4, v6.18.5, v6.18.6, v6.18.7, v6.18.8, v6.18.9, v6.3.0, v6.4.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0, v6.9.0].

我的 composer.json


    "name": "rappasoft/laravel-boilerplate",
    "type": "project",
    "description": "The Laravel Boilerplate Project.",
    "keywords": [
        "framework",
        "laravel",
        "boilerplate"
    ],
    "license": "MIT",
    "require": 
        "php": "^7.2",
        "albertcht/invisible-recaptcha": "^1.9",
        "altek/accountant": "^1.2",
        "altek/eventually": "^1.0",
        "arcanedev/log-viewer": "^5.0",
        "creativeorange/gravatar": "~1.0",
        "davejamesmiller/laravel-breadcrumbs": "^5.0",
        "facade/ignition": "^1.11",
        "fideloper/proxy": "^4.0",
        "lab404/laravel-impersonate": "^1.4",
        "langleyfoxall/laravel-nist-password-rules": "^4.0",
        "laravel/framework": "^6.3",
        "laravel/passport": "^9.3",
        "laravel/socialite": "^4.1",
        "spatie/laravel-html": "^2.22",
        "spatie/laravel-permission": "^3.0",
        "torann/geoip": "^1.0"
    ,
    "require-dev": 
        "barryvdh/laravel-debugbar": "^3.2",
        "barryvdh/laravel-ide-helper": "^2.6",
        "codedungeon/phpunit-result-printer": "^0.26.1",
        "facade/ignition-code-editor": "^1.0",
        "facade/ignition-self-diagnosis": "^1.0",
        "facade/ignition-tinker-tab": "^1.0",
        "friendsofphp/php-cs-fixer": "^2.14",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^8.0",
        "roave/security-advisories": "dev-master"
    ,
    "config": 
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    ,
    "autoload": 
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": 
            "App\\": "app/"
        
    ,
    "autoload-dev": 
        "psr-4": 
            "Tests\\": "tests/"
        
    ,
    "extra": 
        "laravel": 
            "dont-discover": []
        
    ,
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": 
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi",
            "@php artisan ide-helper:generate",
            "@php artisan ide-helper:meta"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ],
        "clear-all": [
            "@php artisan clear-compiled",
            "@php artisan cache:clear",
            "@php artisan route:clear",
            "@php artisan view:clear",
            "@php artisan config:clear",
            "composer dumpautoload -o"
        ],
        "cache-all": [
            "@php artisan config:cache",
            "@php artisan route:cache"
        ],
        "cc": [
            "composer clear-all",
            "composer cache-all"
        ],
        "phpunit": [
            "phpunit > output.txt -d memory_limit=2048M"
        ],
        "coverage-xml": [
            "phpunit --coverage-clover ./coverage.xml"
        ],
        "coverage-html": [
            "phpunit --coverage-html ./coverage"
        ],
        "coverage-text": [
            "phpunit --coverage-text"
        ],
        "format": [
            "php-cs-fixer fix --show-progress=estimating --config=.php_cs.dist"
        ]
    

【问题讨论】:

laravel/framework 已经包含了illuminate/support。如果您已安装框架(您已安装),则无需单独安装 illuminate/support 您尝试安装6.18版本吗? Illuminate 软件包需要与 laravel 的版本相同,日志表明您正在尝试安装 7.x 版本 这能回答你的问题吗? How can I resolve "Your requirements could not be resolved to an installable set of packages" error? @manuerumx..是的,我也尝试过“composer需要照明/支持“v6.18.0””但给了我同样的错误 【参考方案1】:

laravel/框架已经包含了照明/支持。如果您已安装框架(您已安装),则不能单独安装另一个版本的照明/支持,因为它会导致 PSR-4 命名空间冲突。这可以在 node 中完成,但不能在 PHP 的 composer 中完成。

【讨论】:

以上是关于composer requireIllumination/support 会给出一个错误,例如“您的需求无法解析为一组可安装的软件包”。的主要内容,如果未能解决你的问题,请参考以下文章

Composer 找不到配置文件:C:\composer 要初始化项目,请创建一个 composer.json 文件

Docker--compose学习

composer常用命令

composer基础知识科普

jetpack compose 接收返回参数

如何安装Composer