Install php-gd on PHP 5.4

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
optikab
Posts: 32
Joined: 2014/01/19 18:04:15

Install php-gd on PHP 5.4

Post by optikab » 2014/10/26 22:58:08

I installed PHP 5.4 last year probably from another repo but now can't install php-gd I get:

--> Missing Dependency: php-common = 5.1.6-44.el5_10 is needed by package php-gd-5.1.6-44.el5_10.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-44.el5_10 is needed by package php-gd-5.1.6-44.el5_10.i386 (base)

Is there a safe repo I can install php-common and php-gd for 5.4?

User avatar
remirepo
Posts: 408
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: Install php-gd on PHP 5.4

Post by remirepo » 2014/10/27 06:19:12

Please, post full yum output + "rpm -qa php\*"

php-gd (and all php extensions) requires the same base package, by design.
If you have install php-common from a third party repo, you must install php-gd from the same repo.
Remi's Repository - Forum - Blog

optikab
Posts: 32
Joined: 2014/01/19 18:04:15

Re: Install php-gd on PHP 5.4

Post by optikab » 2014/10/27 09:27:33

Yum didn't like that command

User avatar
TrevorH
Forum Moderator
Posts: 29902
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Install php-gd on PHP 5.4

Post by TrevorH » 2014/10/27 11:57:16

It wasn't a yum command, it's an rpm command - rpm -qa php\*

You need to know where you got your copy of php 5.4 from and then get the php-gd package from the same place with the same matching version number as the rest of the packages you already have installed. There are many places you can obtain php 5.4 from, some are more reliable than others. There is the IUS Community repo, Remi's repo, webtatic and probably others too. So, for example, if your current packages came from IUS and they are called php54u-5.4.16 then you will now need php54u-gd-5.4.16 to match it (example only, real release numbers will vary in practice).
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

optikab
Posts: 32
Joined: 2014/01/19 18:04:15

Re: Install php-gd on PHP 5.4

Post by optikab » 2014/10/27 13:05:09

Here is the output

php-common-5.4.20-26.el5.art
php-pdo-5.4.20-26.el5.art
php-devel-5.4.20-26.el5.art
php-cli-5.4.20-26.el5.art
php-soap-5.4.20-26.el5.art
php-pecl-memcache-3.0.8-1.el5.centos.art
php-5.4.20-26.el5.art
php-mysql-5.4.20-26.el5.art
php-pear-1.7.2-2.el5.art

I can't remember the repo used - does this give enough clues?

optikab
Posts: 32
Joined: 2014/01/19 18:04:15

Re: Install php-gd on PHP 5.4

Post by optikab » 2014/10/27 13:09:04

A google search says it might me Atomic, although Centos are warning about that repo.

What is the best way to do this update without getting into problems?

User avatar
TrevorH
Forum Moderator
Posts: 29902
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Install php-gd on PHP 5.4

Post by TrevorH » 2014/10/27 21:23:53

If your packages came from 'art' then you have a choice to either install the php-gd that 'art' supply or to go with a more reputable repo and rip out what you have now and start over with the newer repo. The IUS Community repo are currently shipping php 5.4.32-2 packages for CentOS 5. That would be significantly newer than the 5.4.20 that you currently have and may have critical security updates that you are missing now. The IUS packages are called php54* to make sure that you cannot install them by accident and overwrite the php 5.1.6 package set that CentOS ships.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

optikab
Posts: 32
Joined: 2014/01/19 18:04:15

Re: Install php-gd on PHP 5.4

Post by optikab » 2014/10/28 08:24:04

I've just installed the Atmoic repo and done it that way as this is on a live site taking transaction and don't want to disturb things (it's removed now).

I think it would be best to migrate to Centos 7 now and not have to worry about this kind of thing.

Post Reply

Return to “CentOS 5 - Server Support”