如何在OSX上使用MAMP安装php 7.2.1的gmp扩展?
我正在尝试使用带有P-256曲线和SHA-256哈希算法的椭圆曲线数字签名算法(ECDSA)使用php和此库(lcobucci/jwt)加密令牌.
运行php脚本时出错:
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Class 'Mdanter\Ecc\EccFactory' not found
Run Code Online (Sandbox Code Playgroud)
我想我错过了mdanter/ecc
依赖包,所以我尝试运行以下命令.
命令运行:
composer require mdanter/ecc
Run Code Online (Sandbox Code Playgroud)
输出:
mdanter/ecc v0.5.0 requires ext-gmp * -> the requested PHP extension gmp is missing from your system
Run Code Online (Sandbox Code Playgroud)
我已经尝试了一切我能找到的研究这个错误并与MAMP相关的内容.但我无法解决这个问题.这里有没有人有专门为MAMP添加gmp php扩展的经验,并愿意帮助我吗?
注意:我不是一个非常有经验的Web开发人员,我主要创建iOS应用程序,我想在php中生成令牌,因此我可以访问Apple Music Kit API资源.