CentOS 5 : error in installing php-imap

TMMDev asked:

can someone please help me with this CentOS 5 question?

I am trying to install php-imap, i tried

yum install php-imap

but I am getting the following output:

Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * base: centos.hostingxtreme.com
 * epel: mirror.steadfast.net
 * extras: mirror.team-cymru.org
 * updates: mirror.beyondhosting.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-imap.x86_64 0:5.1.6-44.el5_10 set to be updated
--> Processing Dependency: php-common = 5.1.6-44.el5_10 for package: php-imap
--> Finished Dependency Resolution
php-imap-5.1.6-44.el5_10.x86_64 from updates has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-44.el5_10 is needed by package php-imap-5.1.6-44.el5_10.x86_64 (updates)
Error: Missing Dependency: php-common = 5.1.6-44.el5_10 is needed by package php-imap-5.1.6-44.el5_10.x86_64 (updates)
 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.

I already have php-common installed, I ran “yum install php-common” and got the following output

Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * base: centos.hostingxtreme.com
 * epel: mirror.steadfast.net
 * extras: mirror.team-cymru.org
 * updates: mirror.beyondhosting.net
Setting up Install Process
Package matching php-common-5.1.6-44.el5_10.x86_64 already installed. Checking for update.
Nothing to do

how can I fix this problem?

My answer:


I suspect you have something corrupted somewhere in the RPM database or yum cache. I’d clear them all out and rebuild them.

First the RPM db:

rm -f /var/lib/rpm/__db.*
rpm --rebuilddb   # In later versions, this command changed to  rpmdb --rebuilddb

Then the yum cache:

yum clean all

Then bring everything back in sync with the latest on the remote repositories:

yum distro-sync

Finally, try installing the package again.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.