我正在尝试安装mPDF软件包,当我运行命令composer require mpdf/mpdf它将显示以下错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
Problem 2
- mpdf/mpdf v8.0.2 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- mpdf/mpdf v8.0.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- mpdf/mpdf v8.0.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- Installation request for mpdf/mpdf ^8.0 -> satisfiable by mpdf/mpdf[v8.0.0, v8.0.1, v8.0.2].
To enable extensions, verify that they are enabled in your .ini files:
- C:\php\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.
我可以直接下载mPDF并将其放在我的工作仓库中吗? 还是我必须使用Composer进行安装? 我尝试搜索此错误,我认为唯一的解决方案是安装Chocolatey,然后使用它来安装php7.3.2-gd ,但是如果有更好的解决方案,请告诉我!