thinkphp6.0 composer 安裝 web-token/jwt-framework 常見出錯原因分析及解決方法




composer require web-token/jwt-framework

安裝JWT出現錯誤提示

- web-token/jwt-framework v2.0.1 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
- web-token/jwt-framework v2.0.0 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
- Installation request for web-token/jwt-framework ^2.0 -> satisfiable by web-token/jwt-framework[v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9].

  

To enable extensions, verify that they are enabled in your .ini files: - D:\phpstudy_pro\Extensions\php\php7.3.4nts\php.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. Installation failed, reverting ./composer.json to its original content.

的原因是需要  啟用

extension gmp

注意報錯中的提示信息

修復方法!

打開php.ini

啟用 gmp 拓展

也就是去掉 php.ini 文件中 ;extension=gmp 前面的 ;

修改后保存,重啟服務就行

 

特別提示!!!

web-token/jwt-framework 需要開啟 sodium 拓展

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM