passport: Your requirements could not be resolved to an installable set of packages
Problem 1
- Conclusion: don't install laravel/passport v6.0.6
- Conclusion: don't install laravel/passport v6.0.5
- Conclusion: don't install laravel/passport v6.0.4
- Conclusion: don't install laravel/passport v6.0.3
- Conclusion: don't install laravel/passport v6.0.2
- Conclusion: don't install laravel/passport v6.0.1
- Conclusion: don't install laravel/passport v6.0.0
- Conclusion: don't install laravel/passport 6.0.x-dev
- Conclusion: remove paragonie/random_compat v9.99.99
- Installation request for laravel/passport ^6.0 -> satisfiable by laravel/passport[6.0.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.0.5, v6.0.6].
- Conclusion: don't install paragonie/random_compat v9.99.99
- laravel/passport 6.0.x-dev requires league/oauth2-server ^7.0 -> satisfiable by league/oauth2-server[7.0.0, 7.1.0, 7.1.1, 7.2.0].
- league/oauth2-server 7.1.0 requires defuse/php-encryption ^2.1 -> satisfiable by defuse/php-encryption[v2.1.0, v2.2.0].
- league/oauth2-server 7.1.1 requires defuse/php-encryption ^2.1 -> satisfiable by defuse/php-encryption[v2.1.0, v2.2.0].
- league/oauth2-server 7.2.0 requires defuse/php-encryption ^2.1 -> satisfiable by defuse/php-encryption[v2.1.0, v2.2.0].
- league/oauth2-server 7.0.0 requires paragonie/random_compat ^2.0 -> satisfiable by paragonie/random_compat[v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9].
- defuse/php-encryption v2.1.0 requires paragonie/random_compat ~2.0 -> satisfiable by paragonie/random_compat[v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9].
- defuse/php-encryption v2.2.0 requires paragonie/random_compat ~2.0 -> satisfiable by paragonie/random_compat[v2.0.0, v2.0.1, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9].
- Can only install one of: paragonie/random_compat[v2.0.0, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.1, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.10, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.11, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.12, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.13, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.14, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.15, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.16, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.17, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.2, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.3, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.4, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.5, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.6, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.7, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.8, v9.99.99].
- Can only install one of: paragonie/random_compat[v2.0.9, v9.99.99].
- Installation request for paragonie/random_compat (locked at v9.99.99) -> satisfiable by paragonie/random_compat[v9.99.99].
my php version
PHP 7.2.6 (cli) (built: May 25 2018 06:18:43) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.6, Copyright (c) 1999-2018, by Zend Technologies
my composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.6.*",
"laravel/tinker": "^1.0"
},
"require-dev": {
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.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
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 14
- Comments: 31 (5 by maintainers)
I did the following to fix the installation at the moment.
Same issue with Laravel 5.5.40 Similar resolution as above:
I am using Laravel version 10, and I faced the same issue. I ran the following command and it worked for me.
I hope it would help someone if confronted with this error.
The problem is this:
Version v2.0.17 does not have this problem. I solved it temporarily by adding the following line to composer.json:
Now it’s working.
I am using PHP8.0 and face the same issue running the command and it’s worked for me.
composer require laravel/passport --with-all-dependenciesI’ve done a bit of investigation into this. Essentially this is happening if you have installed uuid before you install Passport or The League’s OAuth2 server. Ben’s uuid library has its requirements set as:
If you only install the uuid lib for the first time, version 9.99.99 will be installed. When you then try to install Passport, it requires
~2.0of random_compat.Composer should downgrade random_compat to satisfy both libraries but it seems there is a bug in composer which is preventing this from occurring. Scott from Paragonie is working on updating the php-encryption library to set the requirement to v9.99.99 which will work around the bug in Composer but this will likely take a few days as he needs to get the signing keys.
If you do a fresh install of the UUID lib and Passport/OAuth2-Server, your installation should have no problems as Composer will correctly determine that both libs require the 2.x branch of random_compat.
In the meantime, @nasrulhazim’s fix will work if you have already composer installed and want to then add further packages. Sorry about this issue and thanks for your patience while a fix is put in place.
composer require paragonie/random_compat=~2.0 composer require laravel/passport=^7.0
It seems like an intentional change by the random_compat guy!
See: https://github.com/paragonie/random_compat/issues/147
Passport requires
league/oauth2-serverwhich requiresdefuse/php-encryptionhence the issues.The maintainer has made a pull request for the php-encryption package here, with a brief explanation.
Hopefully it will be merged soon 🤞.
I have update my laravel project 6 to 7 but I had same problem. I have fixed this and the steps in below. Hope this will be help. In my case I have followed these steps. -> Made changes in composer.json laravel/framework to ^7.0 nunomaduro/collision to ^4.1 phpunit/phpunit to ^8.5 laravel/tinker to ^2.0 facade/ignition to ^2.0 and laravel/ui to ^2.0
-> And then changes in App\Exceptions\Handler class Throwable interface instead of Exception instances public function report(Throwable $exception); // replace Exception with Throwable public function render($request, Throwable $exception); // replace Exception with Throwable
run > composer update
Done…!! Application has been updated
Sigh. Ran
composer updatefirst thing this morning without changing anything and it worked 😒@dbudwin I don’t believe this is correct. There doesn’t need to be any changes to oauth2-server as far as I’m aware. Are you sure you’ve updated all your composer dependencies correctly?
great one @maranesi and @nasrulhazim ❤️
thx @nasrulhazim
same here, @nasrulhazim thanks
Version 2.2.1 of php-encryption has been released. There shouldn’t be a need for a workaround now. This issue can be closed now @monoland
@nasrulhazim it work for me thanks
Thanks @nasrulhazim … Your solution worked for me 😃
Yeah, same issue here.
Edit: Managed to install Passport by adding
"laravel/passport": "^6.0"to my composer.json.Note: I’m using
"php": "^7.1.3",and"laravel/framework": "5.6.*".