Is there a php-gd command for php7?

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


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 ?


1 comment
6 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


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!

Have another answer? Share your knowledge.