0

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.

sridhar pandurangiah
  • 763
  • 2
  • 11
  • 29

3 Answers3

1

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

yum install gcc php53-devel

first. Then

pecl install memcached

again.

etagenklo
  • 5,834
  • 1
  • 27
  • 32
1

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
ALex_hha
  • 7,193
  • 1
  • 25
  • 40
1

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 
James Yale
  • 5,182
  • 1
  • 17
  • 20
  • 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