1、问题描述:
在使用Laravel10安装gregwar/captcha验证码报错,如下:
Cannot use gregwar/captcha's latest version v1.2.1 as it requires ext-gd * which is missing from your platform.
In PackageDiscoveryTrait.php line 318:
Package gregwar/captcha has requirements incompatible with your PHP version, PHP extensions and Composer version:
- gregwar/captcha v1.2.1 requires ext-gd * but it is not present.
- gregwar/captcha v1.2.1 requires ext-mbstring * but it is not present.
2、导致这个错误的原因是:
gregwar/catcha的要求与您的PHP版本、PHP扩展和Composer版本不兼容:
gregwar/catcha v1.2.1需要extgd*,但它不存在。
gregwar/catcha v1.2.1需要ext-mbstring*,但它不存在。
3、解决方法:
把gd扩展和mbstring扩展开启,博主用的是phpstudy,直接打开扩展就可以,如果不是phpstudy的话,直接打开php.ini配置,开启扩展即可
文章评论(0)