About problem in installing ext-sodium * for installing lcobucci/jwt 4.3.0 and kreait/firebase-tokens 4.3.0 for laravel project

227 Views Asked by At

createtoken(""); is not working in my laravel project... where i have deleted vendor file and done composer install:

i am getting :

Problem 1
- lcobucci/jwt is locked to version 4.3.0 and an update of this package was not requested.
- lcobucci/jwt 4.3.0 requires ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
Problem 2
- lcobucci/jwt 4.3.0 requires ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
- kreait/firebase-tokens 4.3.0 requires lcobucci/jwt ^4.3.0|^5.0 -> satisfiable by lcobucci/jwt[4.3.0].
- kreait/firebase-tokens is locked to version 4.3.0 and an update of this package was not requested.

then i did sudo pecl install libsodium

but i am getting :

janammaharjan@Janams-MacBook-Air laravel-uat % sudo pecl install libsodium WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update pecl/libsodium requires PHP (version >= 7.0.0, version <= 8.0.99), installed version is 8.2.4 No valid packages found install failed

I have php version 8.2.4

i tried installing xampp with php 8.0.28 but it is not helping can anyone please help me on this ?

sudo pecl install -f libsodium

i am getting : configure: error: wrong libsodium lib version (< 1.0.8) or lib not found ERROR: `/private/var/tmp/pear/temp/libsodium/configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config' failed

1

There are 1 best solutions below

0
alameen On

From my experience its mainly related to php configuration issue. You might have enable sodium extension if its disabled since they are bundled with php 7.2.0 onwards.

As a Laragon user insted of wampserver I had to enable sodium extension seperatly for each php version.