composer update failed您的要求无法解析为一组可安装的包

时间:2017-08-03 17:21:37

标签: php laravel ubuntu laravel-4 composer-php

我有这个作曲家文件

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "laravel/framework": "4.2.*",
        "guzzlehttp/guzzle": "~4.0",
        "zizaco/confide": "~4.0@dev",
        "zizaco/entrust": "1.2.*@dev",
        "way/generators": "~2.0",
        "zurb/foundation": "5.0.3",
        "artdarek/oauth-4-laravel": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "4.4.*"
    },
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/database/seeds",
            "app/tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "stable"
}

当我跑

composer update

我收到了这个错误

  

使用包信息加载composer存储库       更新依赖项(包括require-dev)       您的要求无法解析为可安装的软件包。

  Problem 1
    - Installation request for artdarek/oauth-4-laravel dev-master -> satisfiable by artdarek/oauth-4-laravel[dev-master].
    - artdarek/oauth-4-laravel dev-master requires lusitanian/oauth dev-master -> satisfiable by
     

lusitanian / oauth [dev-master]但这些与您的要求相冲突   或最小稳定性。

我相信错误发生在artdarek / oauth-4-laravel,但我不知道如何重新获得它,请帮助吗?

2 个答案:

答案 0 :(得分:1)

I found this page [Composer fails when installing a dependency of a dependency, but not when the dependency is installed directly][1] helpful and it fixes my problem, I have changed

"artdarek/oauth-4-laravel": "dev-master"

to

"artdarek/oauth-4-laravel": "@dev"

Does anyone know what is the difference?

答案 1 :(得分:0)

尝试将"lusitanian/oauth" : "dev-master"添加到require列表中。 仅供参考,因为您在寻求稳定性,所以最好使用特定版本:)