windows - 根composer.json需要PHP扩展ext-gd *

mar*_*ira 5 php cmd laravel composer-php

下午好

抱歉,我不会说英语,但我会尝试使用谷歌翻译进行交流

首先,重要的是要告知我使用 windows 10 和 php 7.2

我正在尝试在我的系统上进行某种付款方式!但是当输入命令时

phpcomposer.phar 需要“mercadopago/dx-php”或composer 需要“mercadopago/dx-php”

给出以下错误

在此输入图像描述

You are running Composer with SSL/TLS protection disabled.
Using version ^2.2 for mercadopago/dx-php
./composer.json has been updated
Running composer update mercadopago/dx-php
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires PHP extension ext-gd * but it is missing from your system. Install or enable PHP's gd extension.
  Problem 2
    - mpdf/mpdf is locked to version v7.1.9 and an update of this package was not requested.
    - mpdf/mpdf v7.1.9 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
  Problem 3
    - spatie/array-to-xml is locked to version 2.16.0 and an update of this package was not requested.
    - spatie/array-to-xml 2.16.0 requires php ^7.4|^8.0 -> your php version (7.2.23) does not satisfy that requirement.
  Problem 4
    - league/flysystem 1.1.3 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - laravel/framework v5.6.40 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.1.3].
    - laravel/framework is locked to version v5.6.40 and an update of this package was not requested.

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 and ./composer.lock to their original content.
Run Code Online (Sandbox Code Playgroud)

我给出了以下命令Composer require "ext-gd: " --ignore-platform-reqs* 并且它发生了

在此输入图像描述

You are running Composer with SSL/TLS protection disabled.
./composer.json has been updated
Running composer update ext-gd
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package jpgraph/jpgraph is abandoned, you should avoid using it. No replacement was suggested.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
Class App\agentes located in C:/xampp/htdocs/analiselol - Copia/app\Agentes.php does not comply with psr-4 autoloading standard. Skipping.
Class App\Aportes located in C:/xampp/htdocs/analiselol - Copia/app\aportes.php does not comply with psr-4 autoloading standard. Skipping.
Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
    You can run ".\vendor\bin\upgrade-carbon" to get help in updating carbon and other frameworks and libraries that depend on it.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover

Warning: PHP Startup: Unable to load dynamic library 'php_curl.dll[PHP]' (tried: C:\php\ext\php_curl.dll[PHP] (No foi possvel encontrar o mdulo especificado.), C:\php\ext\php_php_curl.dll[PHP].dll (No foi possvel encontrar o mdulo especificado.)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'php_curl.dll[PHP]' (tried: C:\php\ext\php_curl.dll[PHP] (No foi possvel encontrar o mdulo especificado.), C:\php\ext\php_php_curl.dll[PHP].dll (No foi possvel encontrar o mdulo especificado.)) in Unknown on line 0
Package manifest generated successfully.
56 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Run Code Online (Sandbox Code Playgroud)

在php.ini中我把它拿出来了;以下行的 扩展名 = php_gd2.dll

由于我没有该行 extension=php_gd2.dll我将其添加到此处以尝试解决

我对这部分编程很陌生,如果您错过了一些重要的事情,我很抱歉,我真的需要让它发挥作用!

a 并遵循我的composer.json(如果重要的话)

在此输入图像描述