1

I'm trying to deploy my project with Heroku and I need to install gd on my server. My composer file structure looks

  "require": {
          "ext-gd": "*",
}

When I making composer update i catch the following message.

The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.

Ok, I enter the following command to install

apt-get install php7.0-gd

My installed php version is 7.3.14 even I writing exact version no. I catch the following message:

Reading package lists..Done
Building dependency tree
Reading state information... Done
W: Not using locking for read only lock file /var/lib/dpkg/lock-frontend
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to locate package php7.0-gd
E: Couldn't find any package by glob 'php7.0-gd'
E: Couldn't find any package by regex 'php7.0-gd'

The following suggestion of

composer update --ignore-platform-reqs

also won't help.

I've read a lot of data on this issue but either isn't helped yet.

1 Answers1

-1

try install gd extension by composer with --ignore-platform-reqs key if it need:

composer require ext-gd

and if you are using docker:

1) execute this for install gd extension:

docker-php-ext-install gd

2) and for enable extension on docker:

docker-php-ext-install gd
peakle
  • 149
  • 5