I've had a lot of trouble getting GD to work with my web server (Apache2).

This is a Virtual Private Server using CentOS 5.5 and am currently setting it up from scratch.

I've installed GD (cannot seem to get GD2 in any yum install)...

I've apparently configured PHP 5.2.17 with GD via:

./configure --with-gd=/usr/local/cpanel/src/3rdparty/gpl/gd-1.8.4

and it seemed to check out fine, but when i restart apache and check phpinfo(), no GD is showing.

Can't seem to get this working..


I also found I wasn't able to find any php-gd libs in yum install packages.. Only gd..

Response to comment: output from yum repolist

repo id                repo name                                 status
base                   CentOS-5 - Base                           enabled:  3,535
extras                 CentOS-5 - Extras                         enabled:    299
rpmforge               RHEL 5 - RPMforge.net - dag               enabled: 10,722
updates                CentOS-5 - Updates                        enabled:    765
repolist: 15,321

I also found I wasn't able to find any php-gd libs in yum install packages.. Only gd..

Did you check carefully? It located in base repo:

# repoquery -i php-gd

Name        : php-gd
Version     : 5.1.6
Release     : 27.el5_5.3
Architecture: x86_64
Size        : 341034
Packager    : None
Group       : Development/Languages
URL         : http://www.php.net/
Repository  : base
Summary     : A module for PHP applications for using the gd graphics library
Description :
The php-gd package contains a dynamic shared object that will add
support for using the gd graphics library to PHP.
  • "repoquery - command not found", i also tried rpm -i php-gd and that returned 'no such file'
    – Atticus
    Jul 28 '11 at 2:07
  • Install yum-utils package. rpm -i to install a rpm package, it means you must download the a rpm package before executing. What output you get when running yum install php-gd?
    – quanta
    Jul 28 '11 at 2:18
  • it had said that the package was not found.. should i change my repository? I noticed many posts using installonlyd repository (or something similar), wheras mine is fastestmirror
    – Atticus
    Jul 28 '11 at 2:41
  • fastestmirror is not a repository, it's a yum plugin. Give us the output of yum repolist or grep -lir enabled /etc/yum.repos.d/?
    – quanta
    Jul 28 '11 at 3:09
  • Also appending the exactly output of yum install php-gd to your original post.
    – quanta
    Jul 28 '11 at 3:38

Here is a guide to installing php5.3 with gd on centos 5


FEI: You don't have to manually compile php/apache or install rpms in a cpanel server. You simply use /scripts/easyapache script to configure/enable/disable apache/php modules.


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.