Is there a php-gd command for php7?

December 24, 2015 162.6k views
WordPress PHP LAMP Stack PHP Frameworks

Hello,

i was working on my LAMP install for multiple wordpress site's
they spoke of the command :

sudo apt-get install php5-gd

but i wanted to try and install my LAMP stack with PHP7
so i tried php7-gd but didn't work.

is there such a code for php7 ?

Thanks
Dieter

1 comment
11 Answers

Try php7.0-gd

Try this php 7
sudo apt-get install php7.0-gd

Try this for php 7.1
sudo apt-get install php7.1-gd

sudo apt-get install php7.0-gd

Hi,

I have tried these two codes (sudo apt-get install php7.0-gd,sudo apt-get install php7.1-gd)
but still the problem is their,is their any other solution to solve this problem.

  • possibly because you are using php7.2. You can verify it by typing php -v in your terminal.

    If you are using php7.2, you can install gd library using sudo apt-get install php7.2-gd

I did an upgrade from PHP 5.3 to PHP 5.6 over PHP 7.x and had installed cs-cart whole the website was not showing images, its takes around 2 days trying to figure out how to solve the images displays. After check this post saw that's the library for -GD was missing on upgrade.

I ran the command: sudo apt-get install php5.6-gd and it's solved my issue.
Thank you!

Can't find php5.6-gd on debian 9. On which system version did you sudo apt-get install php5.6-gd ?

if you are running php version 7.2 use:

sudo apt-get install php7.2-gd

Hi, having trouble with installing php7.2-gd on Ubuntu 17.10, I am trying to run

sudo apt-get install php7.2-gd

on my localhost and I'm getting such error and I'm stuck with it;

The following packages have unmet dependencies:
 php7.2-gd : Depends: libjpeg62-turbo (>= 1.3.1) but it is not installable
E: Unable to correct problems, you have held broken packages.

Did anyone got the same issue and kindly let me know if there's a fix for this? TIA!

Hi everyone. Have the same issue. Trying to install php7.3-gd on my ubuntu 14 + php7.3.3 but getting an error like:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.3-gd
E: Couldn't find any package by regex 'php7.3-gd'

Did anybody has the same issue before?

Have another answer? Share your knowledge.