Installing PHP 5.3 Pear on centos 5.8

centos5memcachedphp53

I just created a VPS with 32 bit Centos 5.8 and installed php53 and a host of other php 5.3 packages. I would like to install memcached using yum but I get the following error

Resolving Dependencies
--> Running transaction check
---> Package php-pecl-memcached.i386 0:1.0.0-1.el5 set to be updated
--> Processing Dependency: php-zend-abi = 20050922 for package: php-pecl-memcached
--> Processing Dependency: libmemcached.so.2(libmemcached_2) for package: php-pecl-memcached
--> Processing Dependency: libmemcached.so.2 for package: php-pecl-memcached
--> Running transaction check
---> Package libmemcached.i386 0:0.31-1.1.el5 set to be updated
---> Package php-common.i386 0:5.1.6-40.el5_9 set to be updated
--> Processing Conflict: php53-common conflicts php-common
--> Finished Dependency Resolution
php53-common-5.3.3-13.el5_9.1.i386 from installed has depsolving problems
--> php53-common conflicts with php-common
Error: php53-common conflicts with php-common
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.

Tried package cleanup and everything else mentioned in the message above but still wasn't able to install so I wanted to install it from the PECL libraries and proceeded to install PEAR for PHP5.3

yum install php53-pear

I get an error

No package php53-pear available.
Nothing to do

So I tried (dumb thing to do!)

yum install php-pear 

and managed to install. Followed it by

pecl install memcached

and I get the following errors
building in /var/tmp/pear-build-root/memcached-2.1.0
running: /tmp/tmpCW9TMv/memcached-2.1.0/configure
checking for egrep… grep -E
checking for a sed that does not truncate output… /bin/sed
checking for cc… no
checking for gcc… no
configure: error: no acceptable C compiler found in $PATH
See config.log' for more details.
ERROR:
/tmp/tmpCW9TMv/memcached-2.1.0/configure' failed

I am kind of struck. Is there a way to install PEAR for PHP5.3 on Centos 5.8 and install memcached as well.

Best Answer

It seems that you have 2 version of php: 5.1.6 and 5.3.3

Processing Conflict: php53-common conflicts php-common

I will suggest to add ius community repo and install all necessary packages from them. Install from source it's a bad idea on RHEL based system, imho

# rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm    
# rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-11.ius.el5.noarch.rpm
# yum install php53u-pear php53u-pecl-memcached