I encountered the following error while trying to install laravel/passport. I’ve already added extension=sodium to my php.ini file and attempted to install the package using the command:
composer require laravel/passport:^11.0
However, I still receive the same error. I also tried installing paragonie/sodium_compat_ext_sodium, but that did not resolve the issue.
Here’s the error message:
Problem 1
- Root composer.json requires laravel/passport 12.0 -> satisfiable by laravel/passport[v12.0.0].
- laravel/passport v12.0.0 requires lcobucci/jwt ^4.3|^5.0 -> satisfiable by lcobucci/jwt[4.3.0, 5.0.0, ..., 5.5.0].
- lcobucci/jwt[4.3.0, 5.1.0, ..., 5.5.0] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
Alternatively you can require one of these packages that provide the extension (or parts of it):
- paragonie/sodium_compat_ext_sodium
- juspay/expresscheckout-php-sdk Express Checkout SDK for PHP allows easy integration with Juspay's EC payments as a service platform
- vufind/vufind A flexible discovery layer.
- lcobucci/jwt 5.0.0 requires php ~8.1.0 || ~8.2.0 -> your php version (8.3.14) does not satisfy that requirement.
To enable extensions, verify that they are enabled in your .ini files:
- C:wamp64binphpphp8.3.14php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-sodium` to temporarily ignore these required extensions.
Moreover, I’ve verified that I’m editing the correct php.ini file located at:
C:wamp64binphpphp8.3.14php.ini
I also ran php --ini to confirm the active configuration files. Despite this, the sodium extension is still not detected. I’ve attached my composer.json screenshot for reference.
As per feedback, i have downgrade my php version to 8.2. And now i encounter the following error
Here is the message:
Problem 1
- Root composer.json requires laravel/passport 11.0 -> satisfiable by laravel/passport[v11.0.0].
- laravel/passport v11.0.0 requires illuminate/auth ^9.0 -> found illuminate/auth[v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
