dsepcxw181184853
2019-04-01 06:41 阅读 211
已采纳

您的要求无法解析为laravel 5.7中的可安装程序包集

Unable to install package from laravel 5.7

Using version ^0.8.4 for barryvdh/laravel-dompdf ./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
  - Installation request for laravel/passport == 7.2.1.0 
    -> satisfiable > by laravel/passport[v7.2.1].
  - avored/ecommerce 2.0 requires laravel/passport 5.0.* 
    -> satisfiable by laravel/passport[5.0.x-dev].
  - avored/ecommerce 2.0.1 requires laravel/passport 5.0.* 
    ->  satisfiable by laravel/passport[5.0.x-dev].
  - Conclusion: don't install laravel/passport 5.0.x-dev
  - Installation request for avored/ecommerce 2.* 
    -> satisfiable by > avored/ecommerce[2.0, 2.0.1].

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

My composer.json file:

 {
        "name": "laravel/laravel",
        "description": "The Laravel Framework.",
        "keywords": ["framework", "laravel"],
        "license": "MIT",
        "type": "project",
        "require": {
            "php": "^7.1.3", 
            "avored/ecommerce": "2.*",
            "avored/module-installer": "1.*",
            "fideloper/proxy": "^4.0",
            "laravel/framework": "5.7.*",
            "laravel/passport": "^7.2",
            "laravel/tinker": "^1.0",
            "laravelcollective/html": "^5.7",
            "unisharp/laravel-filemanager": "^1.8"

        },
        "require-dev": {
            "beyondcode/laravel-dump-server": "^1.0",
            "filp/whoops": "^2.0",
            "fzaninotto/faker": "^1.4",
            "mockery/mockery": "^1.0",
            "nunomaduro/collision": "^2.0",
            "phpunit/phpunit": "^7.0",
        "laravel/dusk": "^4.0" 
        },
        "autoload": {
            "classmap": [
                "database/seeds",
                "database/factories"
            ],
            "psr-4": {
                "App\\": "app/"
            }
        },
        "autoload-dev": {
            "psr-4": {
                "Tests\\": "tests/"
            }
        },
        "extra": {
            "laravel": {
                "dont-discover": [
                ]
            }
        },
        "scripts": {
            "post-root-package-install": [
                "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
            ],
            "post-create-project-cmd": [
                "@php artisan key:generate"
            ],
            "post-autoload-dump": [
                "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
                "@php artisan package:discover"
            ]
        },
        "config": {
            "preferred-install": "dist",
            "sort-packages": true,
            "optimize-autoloader": true
        },
        "minimum-stability": "dev",
        "prefer-stable": true
    }
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    duanqi5114 duanqi5114 2019-04-01 07:20

    Delete to this in your composer.json file:

    "require": {
        "avored/ecommerce": "2.*",
    }
    

    Then update composer: composer update


    This package(avored/ecommerce) is not compatible with Laravel 5.7

    For testing purpose I have try this command(composer require avored/ecommerce) in Laravel 5.5, 5.6 and 5.7

    It's worked only Laravel5.5, other 5.6 and 5.7 I also got the same error as yours.

    点赞 评论 复制链接分享
  • dongsheng4126335 dongsheng4126335 2019-04-01 07:00

    There is a dependency conflict specified on the composer.json file, you are stating that you want "laravel/passport": "^7.2" or later, but as you can seee on the avored composer file it requieres laravel/passport 5.0 so downgrade your dependency requirement.

    Also I'm pretty sure passport 5.x is compatible with Laravel 5.6 so you need to downgrade laravel to ^5.6 as well.

    Change:

    "laravel/framework": "5.7.*",

    "laravel/passport": "^7.2",

    with:

    "laravel/framework": "5.6.*",

    "laravel/passport": "^5.0",

    And then execute composer update

    点赞 评论 复制链接分享

相关推荐