I have a PHP 5.6.40 server on which I am trying to install/enable the GD image library....with no success.

I've tried to install the following package

yum install php-gd
yum install php5-gd
yum install php56-php-gd

The first package (php-gd) errors out with dependency resolution errors.

Error: Package: php-gd-5.4.16-46.1.el7_7.x86_64 (updates)
           Requires: php-common(x86-64) = 5.4.16-46.1.el7_7
           Installed: php-common-5.6.40-12.el7.remi.x86_64 (@remi-php56)
               php-common(x86-64) = 5.6.40-12.el7.remi
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php-common(x86-64) = 5.4.16-46.el7
           Available: php-common-5.4.16-46.1.el7_7.x86_64 (updates)
               php-common(x86-64) = 5.4.16-46.1.el7_7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

The second package (php5-gd) shows with the 'No package available' error.

The latter installs all the way through, but the GD module is still not enabled after restarting the HTTPD service and running phpinfo();

Package php56-php-gd-5.6.40-14.el7.remi.x86_64 already installed and latest version

Any ideas how to get this installed and running.

My Base os is Centos 7 (CentOS Linux release 7.6.1810)

I'm really not sure how to get this module installed.

Any help appreciated.

Kind Regards


  • Are you using php-fpm? You may need to restart that specifically – Bert Nov 5 '19 at 15:30

You have install PHP 5.6.40 from a repository which is not enabled (@remi-php56), so you have to enable it for additional extension

As explained by the wizard.

yum-config-manager --enable remi-php56
yum update
yum install php-gd

Notice: PHP 5.6 is now EOL so I hearthly recommend to upgrade to a supported version (7.1+)

P.S. this will also pull 5.6.40-14 (instead of 5.6.40-12) which includes some more security fixes.

| improve this answer | |
  • Hi. Thank you for this - it worked perfectly. We are already working on converting our legacy bespoke application to be PHP 7.1+ ready so will be moving away from PHP 5.6 very soon. Thanks again for your time and recommendations. Kind Regards, James – James Stoddern Nov 6 '19 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.