Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

has anybody solved the problem of installing GDChart on CentOS 5.5 Linux (I've tried both 32 and 64 bit versions)?

I have:

# rpm -qa | grep -i php

And the "pecl" seems to find GDChart in its repository:

#  sudo pecl search GDChart
Retrieving data...0%....50%....Matched packages, channel
Package Stable/(Latest)    Local
GDChart -n/a-/(0.2.0 beta)       GDChart Based Graphing Interface

But installing it fails:

# sudo pecl install GDChart
Failed to download pecl/GDChart within preferred state "stable",
latest release is version 0.2.0, stability "beta", use
"channel://" to install
Cannot initialize 'GDChart', invalid or missing package file
Package "GDChart" is not valid
install failed

Ok, then I try the suggested "URL":

# sudo pecl install "channel://"
pecl/gdchart requires PHP extension "gd"
No valid packages found
install failed

But I do have both "gd" and "php-gd" rpms installed and enabled:

# cat /etc/php.d/gd.ini
; Enable gd extension module

And phpinfo() shows "gd" as enabled too:

GD Support  enabled
GD Version  bundled (2.0.28 compatible)
FreeType Support  enabled
FreeType Linkage  with freetype
FreeType Version  2.2.1
GIF Read Support  enabled
GIF Create Support  enabled
JPG Support  enabled
PNG Support  enabled
WBMP Support  enabled
XBM Support  enabled 

Any suggestions please, except compiling it by hand? Alex

share|improve this question
up vote 0 down vote accepted

pecl command is horrible at telling you why something is erroring out. I'll recreate what you are going though

tar zxfv gdchart-0.2.0.tgz 
cd gdchart-0.2.0

A lot of stuff

In file included from /home/mzupan/gdchart-0.2.0/gdchart.c:35:0:
/home/mzupan/gdchart-0.2.0/gdchart-src/gdc.h:27:16: fatal error: gd.h: No such file or directory
compilation terminated.

So install gd-devel

sudo yum install gd-devel

Then your pecl install should work

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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