LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing php-gd (https://www.linuxquestions.org/questions/linux-newbie-8/installing-php-gd-783897/)

anaigini45 01-21-2010 08:20 PM

Installing php-gd
 
Hi,

I've installed php-imap, php-mycrypt, and php-mysql into my server using the command :

Code:

yum install libc-client
rpm -i http://repo.webtatic.com/yum/centos/5/x86_64/php-imap-5.2.12-1.x86_64.rpm

Code:

yum install libmcrypt
rpm -i http://repo.webtatic.com/yum/centos/5/x86_64/php-mcrypt-5.2.12-1.x86_64.rpm

Code:

yum install php-mysql
rpm -i http://repo.webtatic.com/yum/centos/5/x86_64/php-mysql-5.2.12-1.x86_64.rpm

Now I want to install php-gd. The only version available for php5.2.12 in the webtatic repo is php-gd-5.2.12-1.1.

I do a :
Code:

yum install php-gd
rpm -i http://repo.webtatic.com/yum/centos/5/x86_64/php-gd-5.2.12-1.1.x86_64.rpm

The error that I get is :
Code:

error: Failed dependencies:php-common = 5.2.12-1.1 is needed by php-gd-5.2.12-1.1.x86_64
So I do a :
Code:

rpm -i http://repo.webtatic.com/yum/centos/5/x86_64/php-common-5.2.12-1.1.x86_64.rpm
And then the error that I get is :

Code:

file /usr/lib64/php/modules/curl.so from install of php-common-5.2.12-1.1.x86_64 conflicts with file from package php-common-5.2.12-1.x86_64
file /usr/lib64/php/modules/dbase.so from install of php-common-5.2.12-1.1.x86_64 conflicts with file from package php-common-5.2.12-1.x86_64
file /usr/lib64/php/modules/json.so from install of php-common-5.2.12-1.1.x86_64 conflicts with file from package php-common-5.2.12-1.x86_64
file /usr/lib64/php/modules/zip.so from install of php-common-5.2.12-1.1.x86_64 conflicts with file from package php-common-5.2.12-1.x86_64

My boss insists that I install a php-gd-5.2.12.1.x86_64 and does not want me to remove all the php-common-5.2.12.1.x86_64.

The reason I want to remove php-common-5.2.12.1.x86_64 is so that I can install the newer package, which is php-common-5.2.12.1.1.x86_64.

Please give a link or guide me on how to install php-gd-5.2.12.1.x86_64

kbp 01-22-2010 07:40 AM

Try:
Code:

rpm -Uvh http://repo.webtatic.com/yum/centos/5/x86_64/php-common-5.2.12-1.1.x86_64.rpm
As it's already installed you should Upgrade not install

cheers

andytson 01-22-2010 02:55 PM

kbp is correct, you need to do an upgrade instead.

I rebuilt the PHP 5.2.12 rpms because of the 5.2.12-1 build having an x386 dependency. The newer 5.2.12-1.1 build only links to x86_64 dependencies.

Rather than use the rpm command to upgrade just php-common (there are more php packages installed that need upgrading), you should use yum (which I assume has already been set up with the webtatic repo).

You may want to check with your boss before doing this if it was him/her who set up the previous install.

yum upgrade --enablerepo=webtatic php

Then install php-gd

yum install --enablerepo=webtatic php-gd

Andy (the Webtatic.com repo maintainer)

knudfl 01-24-2010 07:02 AM

rpm -Uvh : is the universal install command,
also used by yum / package managers.

rpm -i or rpm -ivh : is only to be used, if you
on purpose want two versions of the same (library)
package installed.
And is of course only possible, when the files have
different file names.
.....


All times are GMT -5. The time now is 10:34 PM.