【问题标题】:Cannot install Illuminate/routing because of dependencies由于依赖关系,无法安装 Illuminate/routing
【发布时间】:2015-09-22 01:13:18
【问题描述】:

我正在尝试将照明/路由添加到我的 Lumen 项目,但每当我尝试通过 composer 安装它时,都会引发以下错误:

$ composer require illuminate/routing Using version ^5.1 for illuminate/routing ./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
    - The requested package laravel/lumen-framework == 5.0.10.0 could not be found.   Problem 2
    - Installation request for illuminate/contracts == 5.0.33.0 -> satisfiable by illuminate/contracts[v5.0.33].
    - illuminate/routing v5.1.1 requires illuminate/contracts 5.1.* -> satisfiable by illuminate/contracts[v5.1.1].
    - illuminate/routing v5.1.2 requires illuminate/contracts 5.1.* -> satisfiable by illuminate/contracts[v5.1.1].
    - Conclusion: don't install illuminate/contracts v5.1.1
    - Installation request for illuminate/routing ^5.1 -> satisfiable by illuminate/routing[v5.1.1, v5.1.2].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting    see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

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

所以我一直在尝试要求合同,尽管抛出了几乎相同的错误,告诉我需要更新版本的照明/支持

反正我真的不知道该做什么了,我看不出我的选择是什么。

这是我的 composer.json :

{
    "name": "laravel/lumen",
        "description": "The Laravel Lumen Framework.",
        "keywords": ["framework", "laravel", "lumen"],
        "license": "MIT",
        "type": "project",
        "require": {

            "laravel/lumen-framework": "5.1.*",
            "vlucas/phpdotenv": "~1.0",
            "tymon/jwt-auth": "^0.5.4",
        "basicit/lumen-vendor-publish": "^1.0",
        "illuminate/routing": "4"
        },
        "require-dev": {
            "phpunit/phpunit": "~4.0"
        },
        "autoload": {
            "psr-4": {
                "App\\": "app/"
            },
            "classmap": [
                "database/"
                ],
            "files": [
                "app/helpers.php"
                ]
        },
        "autoload-dev": {
            "classmap": [
                "tests/"
                ]
        },
        "config": {
            "minimum-stability": "dev",
            "prefer-stable": true
        }
}

你知道我应该怎么做吗?

【问题讨论】:

  • 遇到了同样的问题。你解决了吗?

标签: php laravel composer-php laravel-routing lumen


【解决方案1】:

从composer.json删除:

"config": {
    "minimum-stability": "dev",
    "prefer-stable": true
}

实际上你不需要它来做任何事情,因为你不依赖任何不稳定的包(这就是它们的用途)。

当我这样做时,删除/vendor 目录并运行composer install,软件包安装正确。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-12-01
    • 1970-01-01
    • 2014-03-07
    • 2021-11-05
    • 1970-01-01
    • 2013-06-15
    • 2017-10-10
    • 2022-01-04
    相关资源
    最近更新 更多