首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >由于依赖关系,无法安装照明/路由

由于依赖关系,无法安装照明/路由
EN

Stack Overflow用户
提问于 2015-07-04 10:34:42
回答 1查看 1.5K关注 0票数 2

我试图将照明/路由添加到Lumen项目中,但是每当我试图通过composer安装它时,就会引发以下错误:

代码语言:javascript
复制
$ 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:

代码语言:javascript
复制
{
    "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
        }
}

你知道我该怎么做吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-07-04 12:44:58

composer.json掉落

代码语言:javascript
复制
"config": {
    "minimum-stability": "dev",
    "prefer-stable": true
}

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

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31219606

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档