I get this error while installing laravel sanctum by composer
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/sanctum[v2.9.0, ..., 2.x-dev] require illuminate/contracts ^6.9|^7.0|^8.0 -> found illuminate/contracts[v6.10.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev]
but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/sanctum ^2.9 -> satisfiable by laravel/sanctum[v2.9.0, ..., 2.x-dev].
I tried to install laravel contracts by
composer require illuminate/contracts
but get this error
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires illuminate/contracts ^8.36, found illuminate/contracts[v8.36.0, v8.36.1, v8.36.2, 8.x-dev] but these were not loaded, likely because it conflicts with
another require.
Composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.1.3",
"darkaonline/l5-swagger": "5.8.*",
"fideloper/proxy": "^4.0",
"fruitcake/laravel-cors": "^2.0",
"iatstuti/laravel-cascade-soft-deletes": "1.0.*",
"laravel/framework": "5.8.*",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^5.2.0",
"morilog/jalali": "3.*",
"niklasravnsborg/laravel-pdf": "^3.1",
"nwidart/laravel-modules": "^5.1",
"predis/predis": "^1.1",
"shetabit/payment": "^2.1",
"ext-json": "*"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
},
"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"
]
}
}
laravel/framework is pinned to v5.8 and laravel/sanctum is not compatible with that. It needs at least Laravel v6
You are using laravel version "laravel/framework": "5.8.*" which does not support laravel/sanctum
Try to upgrade your project to at-least laravel/framework": "7.0.* by following the guide enter link description here
Then Run $composer update
You Need to compatible version of 'illuminate/contracts' and Apparently this package is exist in your project.
check 'composer.json' file and fix 'illuminate/contracts' fits 'laravel/sanctum' and laravel version.
Related
I'm getting this error while installing Laravel Scout:
Problem 1
- laravel/scout[v9.1.0, ..., 9.x-dev] require illuminate/bus ^8.0 -> found illuminate/bus[v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/scout ^9.1 -> satisfiable by laravel/scout[v9.1.0, 9.x-dev].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Here is my composer.json file:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"laravel/framework": "^7.29",
"laravel/tinker": "^2.5",
"laravel/ui": "^2.4"
},
"require-dev": {
"facade/ignition": "^2.0",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.3",
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"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"
]
}
}
In your composer you have "laravel/framework": "^7.29", wich is equivalent to >=7.29 <8.0.0 but you're requiring illuminate/bus[v8.0.0, ..., 8.x-dev] wich is part of laravel/framework >=8.0.0
So, you can't install laravel scount version >= 9.0
try installing version 8.6.1 wich is compatible with laravel 7.x with the command:
composer require "laravel/scout:^8.6.1"
You should just install ext-xml
sudo apt-get install php-xml
sudo apt-get install php-curl
Problem 1
- Root composer.json requires laravel/tinker ^2.0, found laravel/tinker[v2.0.0, ..., 2.x-dev] but the package is fixed to v1.0.10 (lock file version) by
a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 2
- mckenziearts/laravel-notify 2.x-dev requires illuminate/support ~7.0 -> found illuminate/support[v7.0.0, ..., 7.x-dev] but these were not loaded, likely because it conflicts with another require.
- mckenziearts/laravel-notify v2.1 requires illuminate/support ^7.0|^8.0 -> found illuminate/support[v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires mckenziearts/laravel-notify ^2.1 -> satisfiable by mckenziearts/laravel-notify[v2.1, 2.x-dev].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
This is the composer.json file. laravel 6.
I think there's an update for me to do but I don't know where to do that.
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2",
"fideloper/proxy": "^4.0",
"laravel/framework": "^6.0",
"laravel/tinker": "^1.0"
},
"require-dev": {
"facade/ignition": "^1.4",
"fzaninotto/faker": "^1.4",
"laravel/ui": "^1.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"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"
]
}
}
You are using Laravel v6 and try to install mckenziearts/laravel-notify in the most recent version, which is only compatible with Laravel v7 and v8.
You should either upgrade Laravel, or install mckenziearts/laravel-notify in v1 through composer require mckenziearts/laravel-notify "^1.0"
I need to install guzzlehttp/guzzle to work with stripe in laravel 5.8 app but I got
error with installing :
$ composer require guzzlehttp/guzzle
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Using version ^7.2 for guzzlehttp/guzzle
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for php-http/guzzle6-adapter (locked at v1.1.1, required as ^1.0) -> satisfiable by php-http/guzzle6-adapter[v1.1.1].
- Can only install one of: guzzlehttp/guzzle[7.2.0, 6.5.x-dev].
- Can only install one of: guzzlehttp/guzzle[7.3.x-dev, 6.5.x-dev].
- Conclusion: install guzzlehttp/guzzle 6.5.x-dev
- Installation request for guzzlehttp/guzzle ^7.2 -> satisfiable by guzzlehttp/guzzle[7.2.0, 7.3.x-dev].
My composer.json has :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2",
"clarification/sendgrid-laravel-driver": "^2.0",
"darkaonline/l5-swagger": "5.8.*",
"fideloper/proxy": "^4.0",
"jenssegers/agent": "^2.6",
"laravel/framework": "5.8.38",
"laravel/tinker": "^1.0",
"martinlindhe/laravel-vue-i18n-generator": "^0.1.46",
"paragonie/sodium_compat": "^1.14",
"php-http/guzzle6-adapter": "^1.0",
"guzzlehttp/guzzle": "^5.x",
"pusher/pusher-php-server": "^4.1.1",
"stripe/stripe-php": "^7.50",
"tintnaingwin/email-checker": "^2.0",
"spatie/browsershot": "^3.37",
"twilio/sdk": "^5.42"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"files": [
"app/library/helper.php"
],
"psr-4": {
"App\\": "app/"
},
"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"
]
}
}
I use PHP 7.4.15 .
How can it be fixed ?
Thanks!
You have to update the version of your guzzlehttp/guzzle becasue it is required by php version
Try to Change "guzzlehttp/guzzle": "^5.x" to this "guzzlehttp/guzzle": "^7.2.0" and then run composer update and your current php version is ^7.2
you can find more about it in here https://packagist.org/packages/guzzlehttp/guzzle#6.5.5
There is a conflict with the lastest version, use this instead
composer require guzzlehttp/guzzle:^7.0
I have the following error by installing spatie/laravel-stripe-webhooks whit composer
after trying to downgrade composer version or remove some packages , could't resolve the problem
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires spatie/laravel-stripe-webhooks 2.0.0 -> satisfiable by spatie/laravel-stripe-webhooks[2.0.0].
- spatie/laravel-stripe-webhooks 2.0.0 requires illuminate/support ~5.8.0 -> found illuminate/support[v5.8.0, ..., 5.8.x-dev] but it conflicts with your root composer.json require (^8.29).
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Already try to install all available version of this pakage but without success.
Here is my composer.json file:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"illuminate/console": "^8.29",
"illuminate/support": "^8.29",
"laravel/cashier": "^12.9",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.2"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"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"
]
}
}
Have somepne experience whit problem like this one?
Thanks in advance!
The problem is because of in spatie/laravel-stripe-webhooks the illuminate/support version required as ~5.8.0 which conflicts with your composer.json illuminate/support version (you can check it in the package v2.0.0 Link)
You can upgrade it to v2.5.0 (current last release) which requires "illuminate/support": "^6.0|^7.0|^8.0", and its satisfiable with your version "illuminate/support": "^8.29".
To do that just call composer require spatie/laravel-stripe-webhooks
Actually Im trying to set API for my website on Laravel. I found that I need to add CreateFreshApiToken to Kernel.php in order to use it. Well, I wish could, but it doesn't exist. Then I have found I can get it via
composer require laravel/passport
I run it and have this one
composer require laravel/passport
./composer.json has been updated
Running composer update laravel/passport
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- artogrig/laravel-make-service[1.0.0, ..., 1.0.1] require illuminate/support ~5 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires artogrig/laravel-make-service ^1.0 -> satisfiable by artogrig/laravel-make-service[1.0.0, 1.0.1].
This is my comsposer.json:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"artogrig/laravel-make-service": "^1.0",
"cviebrock/eloquent-sluggable": "^7.0",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.5",
"laravel/framework": "^7.0",
"laravel/passport": "^4.0",
"laravel/socialite": "^3.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
"tcg/voyager": "^1.4"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"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"
]
},
"repositories": {
"hooks": {
"type": "composer",
"url": "https://larapack.io"
}
}
}
I have no idea what to do with. Could someone help me, please!
Thanks!
The dependency artogrig/laravel-make-service only works with Illuminate\Support 5, for what this package does, create service classes and is unmaintained. I would simply just remove it and your dependencies would be fixed.