Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

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
share|improve this answer
    
Never tried this. But will on my next VPS. I would probably be better of installing Centos 6 –  sridhar pandurangiah Jul 27 '13 at 12:56
    
Couldn't resist trying this. So installed everying from the ius repos. ius community repositories is the best bet for someone looking to retain php 5.3 and still have pecl. Thank you ALex_hha –  sridhar pandurangiah Jul 27 '13 at 14:01

Your problem here is the conflict between the PHP 5.3.3 common files and the PHP 5.1.6 files, yum is telling you this here:

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

To resolve, simply remove php-common then run your original yum command again.

yum remove php-common
yum install php-pecl-memcached

Unless you've got a specific requirement, I'd suggest sticking to the packaged versions of these files rather than compiling from source.

edit: You may want to clear out all of the php packages and start again:

rpm -qa | grep php | xargs rpm -e 
share|improve this answer
    
I cleared out all the packages. $yum remove php-common Package(s) php-common available, but not installed. No Packages marked for removal Then $yum install php-pecl-memcached Funny it reinstalled php-common of php 5.1 but did not throw conflicts. Nevertheless memcached is installed. Thank you James Yale. –  sridhar pandurangiah Jul 27 '13 at 12:49

You're missing a compiler (and probably also php headers). Try

yum install gcc php53-devel

first. Then

pecl install memcached

again.

share|improve this answer
    
I had installed php52-devl right in the beginning. I installed gcc and tried installing memcached. NO LUCK :-( –  sridhar pandurangiah Jul 23 '13 at 12:53
    
What error message do you get after installing gcc? –  etagenklo Jul 23 '13 at 14:43
    
bash: pecl: command not found –  sridhar pandurangiah Jul 27 '13 at 12:38

Your Answer

 
discard

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.