composer unable to install laravel/passport

Posted by

Error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - lcobucci/jwt[4.3.0, 5.0.0, ..., 5.2.0] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
    - laravel/passport v11.9.0 requires lcobucci/jwt ^4.3|^5.0 -> satisfiable by lcobucci/jwt[4.3.0, 5.0.0, 5.1.0, 5.2.0].
    - Root composer.json requires laravel/passport 11.9.0 -> satisfiable by laravel/passport[v11.9.0].

To enable extensions, verify that they are enabled in your .ini files:
    - /opt/lampp/etc/php.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.

Solution:

I am using PHP8.1 and face the same issue running the command and it’s worked for me.

composer require laravel/passport  --with-all-dependencies

And then runĀ composer updateĀ command.

Problem has been resolved

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x