php-docs-samples: The requested PHP extension gd is missing from your system [Flexible environment]
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.
My php.ini looks likes this:
extension=gd.so extension=curl.so extension=imagick.so extension=fileinfo.so
I’m getting the following output:
Loading composer repositories with package information Installing dependencies from lock file Your requirements could not be resolved to an installable set of packages.
Problem 1 - Installation request for dompdf/dompdf v0.8.0 -> satisfiable by dompdf/dompdf[v0.8.0]. - dompdf/dompdf v0.8.0 requires ext-gd * -> the requested PHP extension gd is missing from your system. Problem 2 - dompdf/dompdf v0.8.0 requires ext-gd * -> the requested PHP extension gd is missing from your system. - barryvdh/laravel-dompdf v0.8.1 requires dompdf/dompdf ^0.8 -> satisfiable by dompdf/dompdf[v0.8.0]. - Installation request for barryvdh/laravel-dompdf v0.8.1 -> satisfiable by barryvdh/laravel-dompdf[v0.8.1].
To enable extensions, verify that they are enabled in your .ini files: - /opt/php56/lib/php-cli.ini - /opt/php56/lib/ext.enabled/ext-apcu.ini - /opt/php56/lib/ext.enabled/ext-json.ini - /opt/php56/lib/ext.enabled/ext-libsodium.ini - /opt/php56/lib/ext.enabled/ext-mailparse.ini - /opt/php56/lib/ext.enabled/ext-memcached.ini You can also run
php --ini
inside terminal to see which files are used by PHP in CLI mode. The command ‘/bin/sh -c /build-scripts/composer.sh’ returned a non-zero code: 2 ERROR ERROR: build step “gcr.io/cloud-builders/docker@sha256:f0bdb31bcf87dad333755477c02916411d5ac9ea891497d304a360b01f2fcb10” failed: exit status 2
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 16 (2 by maintainers)
You need to add “ext-gd”: “*” to your application’s
composer.json
:It doesn’t matter if
gd
is enabled in your local PHP install, the flexible environment is built using yourcomposer.json
andapp.yaml
files, so you need to add it there.finally after 7 days of searching, thanks bro
Just resolved it OS: Windows I had to add extension=php_gd2.dll to the bottom of my php.ini file.
The dll was already there in the ext folder
Hello, Try going to php.ini then look for ;extension=gd Remove the ; this is how i made mine work
i remove ; from php .ini line
extension=gd
and runcomposer require "ext-gd:*" --ignore-platform-reqs
but none of them works! i still get errorGD Library extension not available with this PHP installation.
I followed the steps suggested above. I am trying to run composer require phpoffice/phpspreadsheet but I receive the following error every time I try to run this command: Problem 1 - The requested PHP extension ext-gd * is missing from your system. Install or enable PHP’s gd extension. Problem 2 - phpoffice/phpspreadsheet 1.7.0 requires ext-gd * -> the requested PHP extension gd is missing from your system. - phpoffice/phpspreadsheet 1.7.0 requires ext-gd * -> the requested PHP extension gd is missing from your system. - Installation request for phpoffice/phpspreadsheet 1.7.0 -> satisfiable by phpoffice/phpspreadsheet[1.7.0].
please reply if you have any clue how to resolve this.
For your info:
@nadia-am @alvin-c-h This solution is for the Google Cloud App Engine Flexible environment. If you’re encountering this error outside this environment, the solution will be different. You’ll need to install / enable the GD extension for that environment.
use sudo apt-get install phpX.X-gd
change php.X.X for your php version.
I have a same issue as you. Did you resolve it?? Help me, please @jasmohan
Can anyone help while executing this command
php composer require "ext-gd:*" --ignore-platform-reqs
I’m getting is error: [InvalidArgumentException] Could not find a matching version of package ext-gd. Check the package spelling, your version constraint and that t he package is available in a stability which matches your minimum-stability (stable).I’ m trying to install mpdf via composer so there is need of gd driver.
My system configuration is window 10.