PHP7.2 has all modules installed but 'composer create' complains that they don't exist

Created on 28 April 2020, about 5 years ago
Updated 21 June 2025, 1 day ago

Fresh install, I have installed initially installed PHP7.2 and all extensions, and double checked this with "php72 --modules" but after installing composer and running "composer create-project drupal/recommended-project" it fails with:

Creating a "drupal/recommended-project" project at "./recommended-project"
Installing drupal/recommended-project (8.8.5)
- Installing drupal/recommended-project (8.8.5): Loading from cache
Created project in /home/drupal/drupal/recommended-project
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for drupal/core 8.8.5 -> satisfiable by drupal/core[8.8.5].
- drupal/core 8.8.5 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
- Installation request for easyrdf/easyrdf 0.9.1 -> satisfiable by easyrdf/easyrdf[0.9.1].
- easyrdf/easyrdf 0.9.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 3
- drupal/core 8.8.5 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- drupal/core-recommended 8.8.5 requires drupal/core 8.8.5 -> satisfiable by drupal/core[8.8.5].
- Installation request for drupal/core-recommended 8.8.5 -> satisfiable by drupal/core-recommended[8.8.5].

To enable extensions, verify that they are enabled in your .ini files:

If I run "php --modules" it doesn't list gd nor mbstring. I thought that PHP7.2 would be used and hence, the extensions would be added automatically.
But
$ ls /opt/rh/rh-php72/root/usr/lib64/php/modules
shows:
bz2.so curl.so fileinfo.so iconv.so posix.so sockets.so sysvshm.so xmlreader.so xsl.so
calendar.so dom.so ftp.so json.so shmop.so sysvmsg.so tokenizer.so xml.so zip.so
ctype.so exif.so gettext.so phar.so simplexml.so sysvsem.so wddx.so xmlwriter.so

Where are the libraries for gd, mbstring, etc. so that I can include them in the ext-dir?

I'm on Oracle Linux 7.7.

💬 Support request
Status

Fixed

Version

1.0

Component

Documentation

Created by

🇪🇸Spain khollman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    This is the issue queue for a PHP extension thought for Drupal 7. It is not the Drupal core issue queue.

Production build 0.71.5 2024