Ad

Composer Require. "Your Requirements Could Not Be Resolved To An Installable Set Of Packages"

- 1 answer

I have an error when I want to run the composer require on my project. errors issued like this:

# composer require spatie/laravel-link-checker
Using version ^4.1 for spatie/laravel-link-checker
./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
    - Conclusion: remove laravel/framework v5.8.18
    - Conclusion: don't install laravel/framework v5.8.18
    - spatie/laravel-link-checker 4.1.0 requires illuminate/support ~5.6.0 -> satisfiable by illuminate/support[5.6.x-dev, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9], laravel/framework[5.6.x-dev].
    - spatie/laravel-link-checker 4.1.1 requires laravel/framework ~5.6.0|~5.7.0 -> satisfiable by laravel/framework[5.6.x-dev, 5.7.x-dev].
    - don't install illuminate/support 5.6.x-dev|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.0|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.1|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.10|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.11|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.12|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.13|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.14|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.15|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.16|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.17|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.19|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.2|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.20|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.21|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.22|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.23|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.24|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.25|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.26|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.27|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.28|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.29|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.3|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.30|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.31|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.32|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.33|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.34|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.35|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.36|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.37|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.38|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.39|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.4|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.5|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.6|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.7|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.8|don't install laravel/framework v5.8.18
    - don't install illuminate/support v5.6.9|don't install laravel/framework v5.8.18
    - Can only install one of: laravel/framework[5.6.x-dev, v5.8.18].
    - Can only install one of: laravel/framework[5.7.x-dev, v5.8.18].
    - Installation request for laravel/framework (locked at v5.8.18, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.18].
    - Installation request for spatie/laravel-link-checker ^4.1 -> satisfiable by spatie/laravel-link-checker[4.1.0, 4.1.1].


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

I'm using Laravel 5.8.

This is my Composer.json

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.1.3",
        "appzcoder/laravel-admin": "^3.1",
        "barryvdh/laravel-debugbar": "^3.2",
        "chriskonnertz/open-graph": "^1.0",
        "cviebrock/eloquent-sluggable": "4.8",
        "davejamesmiller/laravel-breadcrumbs": "5.x",
        "doctrine/dbal": "v2.4.2",
        "fideloper/proxy": "^4.0",
        "gpressutto5/laravel-slack": "^1.1",
        "guzzlehttp/guzzle": "^6.3",
        "intervention/image": "^2.4",
        "laravel/framework": "5.8.*",
        "laravel/slack-notification-channel": "^2.0",
        "laravel/tinker": "^1.0",
        "layershifter/tld-extract": "^2.0",
        "malhal/laravel-geographical": "^1.0",
        "yajra/laravel-datatables-oracle": "^9.0"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "laravel/telescope": "^2.0",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.5"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {

        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

anyone who can help me? Thanks

Ad

Answer

laravel-link-checker package (which is, by the way, abandoned) requires laravel framework 5.6/5.7 (as you can see in its packagist page. You have Laravel 5.8 and that is not satisfiable.

You can take the sources of laravel-link-checker and re-package it but it's not guaranteed it will work for Laravel 5.8.

Ad
source: stackoverflow.com
Ad