Skip to content
Latchkey

Composer "requires ext-gd * -> it is missing from your system" in CI

A package declares a ext-gd platform requirement and the runner PHP has no GD extension loaded. Composer treats the extension as an unsatisfiable dependency and stops.

What this error means

composer install fails with "requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension".

Composer
  Problem 1
    - intervention/image 2.7.2 requires ext-gd * -> it is missing from your system.
      Install or enable PHP's gd extension.

Common causes

The GD extension is not installed on the runner PHP

The CI PHP build does not include GD, so a package that requires ext-gd cannot be satisfied.

A different PHP than expected is active

The extension is present on one interpreter but the job runs another PHP where GD is absent.

How to fix it

Enable the extension via setup-php

  1. Read which ext-* the Problem block names.
  2. Add it to the "extensions" input of shivammathur/setup-php.
  3. Re-run so Composer sees the extension loaded.
.github/workflows/ci.yml
- uses: shivammathur/setup-php@v2
  with:
    php-version: '8.2'
    extensions: gd, intl, zip

Confirm it loaded

Print the loaded extensions to verify the runner PHP now includes GD.

Terminal
php -m | grep -i gd

How to prevent it

  • List every required ext-* in the setup-php "extensions" input.
  • Keep the setup-php extensions in sync with your composer.json platform requires.
  • Run php -m early in the job to confirm extensions are present.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →