GitLab PHP docker image - the requested PHP extension gd is missing from your system

Active3 hr before
Viewed126 times

6 Answers


I fixed the errors when I added this to my gitlab-ci.yml file:,But that also produced the same error.,I've tried a couple things like on our gitlab-ci.yml:,But this gave me this error:

I fixed the errors when I added this to my gitlab-ci.yml file:

   -apt - get update - yqq -
   apt - get install libjpeg - dev libpng - dev - yqq -
   docker - php - ext - install gd
load more v

phpoffice/phpspreadsheet 1.7.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.,The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension. Problem 2,I haven't had this issue before, but today I started getting the error: "The requested PHP extension gd is missing from your system Flexible environment" when trying to the deploy my application.,i remove ; from php .ini line extension=gd and run composer require "ext-gd:*" --ignore-platform-reqs but none of them works! i still get error GD Library extension not available with this PHP installation.

composer require "ext-gd:*"--ignore - platform - reqs

#php - v to get version(change to php7 .2 or whatever version
   if needed)
sudo apt - get install php7 .0 - gd

You might wonder what docker-php-ext-install is. In short, it is a script provided by the official PHP Docker image that you can use to easily install extensions. For more information read the documentation. ,While it is possible to test PHP apps on any system, this would require manual configuration from the developer. To overcome this we use the official PHP Docker image that can be found in Docker Hub. ,The official images are great, but they lack a few useful tools for testing. We need to first prepare the build environment. A way to overcome this is to create a script which installs all prerequisites prior the actual testing is done. ,Now that we created the script that contains all prerequisites for our build environment, let’s add it in .gitlab-ci.yml:

image: php: 5.6
load more v

When Heroku recognizes a PHP application, it will respond accordingly during a push:,Upon the next push, Heroku will install and enable the corresponding PHP extensions:,This document describes the general behavior of Heroku as it relates to the recognition and execution of PHP applications.,Heroku allows you to run your application using the official PHP runtime.

If you do not have the desired extension available locally on your computer, the composer update step would fail because the requirements in composer.json cannot be satisfied. If you cannot install the missing extension on your computer using pecl, brew, or similar methods (something you absolutely should do in the interest of maintaining dev/prod parity), you can instruct composer to ignore the missing (so-called “platform”) requirements:

$ composer update--ignore - platform - reqs

अनुरोधित PHP एक्सटेंशन gd आपके सिस्टम से गायब है,आपके सिस्टम से अनुरोधित PHP एक्सटेंशन ext-gd ^7.1 गायब है। PHP का gd एक्‍सटेंशन इंस्‍टॉल या सक्षम करें.

मैंने अपने gitlab-ci.yml पर कुछ चीज़ें आज़माई हैं:

apt - get update - yqq
apt - get install - yqq libpng - dev

मैंने composer.json फ़ाइल से ext-gd की आवश्यकता की भी कोशिश की:

composer require ext - gd

मेरे द्वारा किया गया अंतिम प्रयास था:

apt - get install php - common
phpenmod gd
load more v