GD Issues (CentOS 5.4, PHP 5.3.2)

Hi All,

Ive got a bit of a problem, and was wondering if someone could point me in the right direction.

I have a CentOS 5.4 server, and after installing InterWorx I upgraded to PHP 5.3.2 using the instructions here:

This has worked brilliantly, except for one small issue - I cant install GD.

When I do “yum install php-gd” I get told that “php-common” is required, and it suggests that the version of “php-common” wanted is for the original version of PHP.

I guess this is because the version of GD that yum is trying to get is for the older version of PHP, and I simply need to use a repo that has a newer version in. Only problem is I cant seem to find one to try this.

Any pointers in the right direction would be greatly appreciated.



PS - Below is the output from my attempt to install “php-gd”:

[root@hosting ~]# yum install php-gd
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.1.6-27.el5 set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-gd
--> Finished Dependency Resolution
php-gd-5.1.6-27.el5.x86_64 from base has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-27.el5 is needed by package php-gd-5.1.6-27.el5.x86_64 (base)
Error: Missing Dependency: php-common = 5.1.6-27.el5 is needed by package php-gd-5.1.6-27.el5.x86_64 (base)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

Hello Hacman, welcome to the InterWorx forums!

What’s happening is that because the webtatic repository is disabled by default in the .repo file, yum is trying to install the dependencies from CentOS Base.

If you run the following up statement, it should install correctly.

yum --enablerepo=webtatic install php-gd

Alternatively you can enable the repository in the .repo file, but this may try to update other packages (I noticed it tried to update Apache on my server) and it could cause issues down the road.

Seems to have worked perfectly. GD is now installed.

Didnt enable it in the repo file as I dont like the idea of other stuff being updated without good cause in a production environment.

Many, many thanks,


gd-install update

As of 10-29-2011 the correct way to add php-gd is

yum install php-gd

without --enablerepo=webtatic as posted before.