Installing GD Library on Centos 6.7 and PHP 5.4

keeg asked:

Versions:
centos-release-6-7.el6.centos.12.3.x86_64
PHP 5.4.45

  1. Installed GD using yum:

$ yum install php54w-gd

Installed: php54w-gd.x86_64 0:5.4.45-2.w6

  1. Restarted:

$ service httpd restart

  1. Checked

Running: $ rpm -qa | grep php

I get:

php54-php-common-5.4.40-2.el6.x86_64
php54-php-pear-1.9.4-10.el6.noarch
php54w-common-5.4.45-2.w6.x86_64
php54w-pear-1.10.1-1.w6.noarch
php54w-devel-5.4.45-2.w6.x86_64
rhscl-php54-epel-6-x86_64-1-2.noarch
php54w-cli-5.4.45-2.w6.x86_64
php54w-mbstring-5.4.45-2.w6.x86_64
php54w-pdo-5.4.45-2.w6.x86_64
php54w-mcrypt-5.4.45-2.w6.x86_64
wbm-php-pear-1.5-1.noarch
php54-runtime-2.0-1.el6.x86_64
php54-php-cli-5.4.40-2.el6.x86_64
php54-php-process-5.4.40-2.el6.x86_64
php54-php-pdo-5.4.40-2.el6.x86_64
php54-2.0-1.el6.x86_64
php54w-xml-5.4.45-2.w6.x86_64
php54-php-xml-5.4.40-2.el6.x86_64
php54-php-mysqlnd-5.4.40-2.el6.x86_64
php54-php-mbstring-5.4.40-2.el6.x86_64
php54w-5.4.45-2.w6.x86_64
php54w-mysql-5.4.45-2.w6.x86_64
php54w-process-5.4.45-2.w6.x86_64
php54w-gd-5.4.45-2.w6.x86_64

so php54w-gd-5.4.45-2.w6.x86_64 is listed…

However running phpinfo() no sign of GD library…

My answer:


Your system has two completely different and incompatible builds of PHP installed, one from Webtatic and one from Software Collections.

Remove all the packages from one and install the PHP GD package from the other. The package name in Software Collections follows the same format as the rest of them: php54-php-gd.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.