Issue with installing php extension gd

Since this morning I started getting the following error when trying to enable the PHP GD extension:

/usr/local/bin/docker-php-ext-enable: 108: /usr/local/bin/docker-php-ext-enable: cannot create /conf.d/docker-php-ext-gd.ini: Directory nonexistent

I’ve not touched the .circleci/config.yml file at any point, and any old previously passing builds are now also failing. I also tried a different image, but nothing works so far.

Below is an extract of my CircleCI config file:

      - image: circleci/php:7.2-browsers

    working_directory: ~/repo

      - checkout

      - run:
          name: Install GD library
          command: sudo apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && sudo docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && sudo docker-php-ext-install -j$(nproc) gd
1 Like

Just this morning I’ve been getting this error also.
In my case it is with mysqli:

/usr/local/bin/docker-php-ext-enable: cannot create /conf.d/docker-php-ext-mysqli.ini: Directory nonexistent

It’s been working fine for the last 3 months without anyway issues. I haven’t touched the config.yml since then.

Go back to your last successful build and get the image ID from the first build step - it is a long 40-character hash (sha256). You can then lock to that hash by using circleci/php:7.2-browsers@(hash).

If that fixes it, then consider that a short-term resolution until you can work out the true cause. It is better if you can avoid locking over the long term, as you won’t benefit from OS security and performance fixes.

Hi, same issue here with gd

Same issue here, also didnt touch the config.yml
Trying the “hack” halfer posted, the correct format is to include “sha-256” before the hash:

Best regards

I fixed it by doing sudo -E docker-php-ext-install -j$(nproc) gd (


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.