简体   繁体   中英

Unable to locate package php gd Heroku

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM