关于为 laravel 项目安装 lcobucci/jwt 4.3.0 和 kreait/firebase-tokens 4.3.0 时安装 ext-sodium * 的问题

问题描述 投票:0回答:1

创建令牌(“”);在我的 laravel 项目中不起作用...我已删除供应商文件并完成

composer install
:

我得到:

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.

然后我就这么做了

sudo pecl install libsodium

但我得到:

janammaharjan@Janams-MacBook-Air laravel-uat % sudo pecl install libsodium 警告:通道“pecl.php.net”已更新其协议,请使用“pecl channel-update pecl.php.net”来更新 pecl/libsodium 需要 PHP(版本 >= 7.0.0,版本 <= 8.0.99), installed version is 8.2.4 No valid packages found install failed

我有 php 版本 8.2.4

我尝试使用 php 8.0.28 安装 xampp,但它没有帮助,有人可以帮助我吗?

sudo pecl install -f libsodium

我得到: 配置:错误:libsodium lib 版本错误(< 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

php laravel xampp libsodium
1个回答
0
投票

根据我的经验,主要与php配置问题有关。 如果钠扩展被禁用,您可能会启用它,因为它们与 php 7.2.0 及以上版本捆绑在一起。

作为安装了 wampserver 的 Laragon 用户,我必须为每个 php 版本单独启用钠扩展。

希望这有帮助!

© www.soinside.com 2019 - 2024. All rights reserved.