install/enable GD2 library ?

July 28, 2015 22.1k views
Ubuntu PHP


i have php gd installed and on the latest version but the script i am trying to install insists that i need to have GD2 enabled/installed, i looked everything, there’s nothing about GD2 or just extremely old posts

please help,
thank you

1 comment
  • Are you running Apache or nginx? On nginx (and Apache if you are not using mod_php) you will want to restart the php5-fpm service in order for the new module to be available.

1 Answer

PHP’s GD extension will be using the version of the GD library that is provided with your operating system. If you’re using a modern operating system such as Ubuntu 12.04 or 14.04, then you’ll be using GD2.

You can confirm the version of the GD library that PHP is using by checking the output of the PHP function phpinfo().

Alternatively, you can test this from the command line with with the command:

php -i | grep "GD Version"

On a server managed by ServerPilot where multiple versions of PHP are available, the command is slightly different as you need to specify which PHP version in the PHP command:

php5.6-sp -i | grep "GD Version"

The output will look something like this:

GD Version => bundled (2.1.0 compatible)
  • I am getting the same issue. I am using ubuntu 1.10 and nginx. I dont get any reply from trying to determine gd2 setting so it looks like it doesnt exist.

Have another answer? Share your knowledge.