# 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.

- **ID:** `php/composer-platform-req-fail`
- **Domain:** php
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

Composer detects that a required PHP extension (ext-gd) is not installed or enabled in the current PHP runtime, preventing package installation due to platform requirements.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Composer 2.2 | active | — | — |
| Composer 2.5 | active | — | — |
| Composer 2.6 | active | — | — |
| PHP 7.4 | active | — | — |
| PHP 8.0 | active | — | — |
| PHP 8.1 | active | — | — |
| PHP 8.2 | active | — | — |

## Workarounds

1. **Install the missing PHP extension: for Ubuntu/Debian, run `sudo apt-get install php8.2-gd` then restart PHP-FPM `sudo systemctl restart php8.2-fpm`. For CentOS/RHEL, run `sudo yum install php-gd` and restart Apache or PHP-FPM.** (95% success)
   ```
   Install the missing PHP extension: for Ubuntu/Debian, run `sudo apt-get install php8.2-gd` then restart PHP-FPM `sudo systemctl restart php8.2-fpm`. For CentOS/RHEL, run `sudo yum install php-gd` and restart Apache or PHP-FPM.
   ```
2. **If the extension is already installed but not enabled, check `php.ini` for `extension=gd` or `extension=gd.so`, uncomment it, and restart PHP. Also verify with `php -m | grep gd`.** (85% success)
   ```
   If the extension is already installed but not enabled, check `php.ini` for `extension=gd` or `extension=gd.so`, uncomment it, and restart PHP. Also verify with `php -m | grep gd`.
   ```

## Dead Ends

- **** — The platform requirement check is independent of plugins; `--no-plugins` only disables plugin scripts, not the requirement validation. (95% fail)
- **** — Composer reads the `require` section from `composer.json`; clearing cached files does not change the requirement. The extension must be installed first. (90% fail)
