On my CentOS/VirtualMin server configured for RPMForge, I wanted to run yum update, but I was getting the following errors while resolving dependencies for the clam* packages (you can list them by typing: rpm -qa | grep clam
.
clamav-server-sysv-0.96-1.vm.el5.i386 from installed has depsolving problems
--> Missing Dependency: clamav-server = 0.96-1.vm.el5 is needed by package clamav-server-sysv-0.96-1.vm.el5.i386 (installed)
Error: Missing Dependency: clamav-server = 0.96-1.vm.el5 is needed by package clamav-server-sysv-0.96-1.vm.el5.i386 (installed)
I’ve had this problem on other servers where I had simply ignored it. But it was getting too much. So I researched and found the following solution working perfectly.
Solution
- Remove the clam rpms without removing the dependencies (virtualmin-base) by typing:
rpm --nodeps -e clamav-0.96-1.vm.el5
and rpm --nodeps -e clamav-server-sysv-0.96-1.vm.el5
.
- Run yum update
And voila, I get the following:
Dependencies Resolved
=====================================================================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================================================================
Installing:
clamav i386 0.96.4-1.el5.rf rpmforge 2.2 M
replacing clamav-lib.i386 0.96-1.vm.el5
clamav-db i386 0.96.4-1.el5.rf rpmforge 25 M
replacing clamav-update.i386 0.96-1.vm.el5
clamd i386 0.96.4-1.el5.rf rpmforge 233 k
replacing clamav-server.i386 0.96-1.vm.el5
Another solution: I have had servers that had conflicts even on the yum update, because maybe dependent packages came from conflicting repos. Specifically, clamav dependencies of rpmforge conflicted with clamav dependencies of virtualmin. To solve this, I ran: yum --disablerepo=* --enablerepo=virtualmin install clamav clamav-filesystem clamav-data clamav-lib
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package clamav.x86_64 0:0.96.5-1.vm.el5 set to be updated
---> Package clamav-data.x86_64 0:0.96.5-1.vm.el5 set to be updated
---> Package clamav-filesystem.x86_64 0:0.96.5-1.vm.el5 set to be updated
---> Package clamav-lib.x86_64 0:0.96.5-1.vm.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================
Installing:
clamav x86_64 0.96.5-1.vm.el5 virtualmin 934 k
clamav-data x86_64 0.96.5-1.vm.el5 virtualmin 25 M
clamav-filesystem x86_64 0.96.5-1.vm.el5 virtualmin 18 k
clamav-lib x86_64 0.96.5-1.vm.el5 virtualmin 4.4 M
Transaction Summary
===========================================================================================================================================
Install 4 Package(s)
Upgrade 0 Package(s)
Total download size: 31 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): clamav-filesystem-0.96.5-1.vm.el5.x86_64.rpm | 18 kB 00:00
(2/4): clamav-0.96.5-1.vm.el5.x86_64.rpm (0%) 17% [======= ] 0.0 B/s | 160 kB --:-- ETA
(3/4): clamav-lib-0.96.5-1.vm.el5.x86_64.rpm (3%) 3% [=- ] 0.0 B/s | 168 kB --:-- ETA
(4/4): clamav-data-0.96.5-1.vm.el5.x86_64.rpm (17%) 0% [ ] 0.0 B/s | 40 kB --:-- ETA
-------------------------------------------------------------------------------------------------------------------------------------------
Total 914 kB/s | 31 MB 00:34
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : clamav-filesystem 1/4
Installing : clamav-data 2/4
Installing : clamav-lib 3/4
Installing : clamav 4/4
Installed:
clamav.x86_64 0:0.96.5-1.vm.el5 clamav-data.x86_64 0:0.96.5-1.vm.el5 clamav-filesystem.x86_64 0:0.96.5-1.vm.el5
clamav-lib.x86_64 0:0.96.5-1.vm.el5
Along with the above solution, you must remember to disable the conflicting repository. In this case, rpmforge. If rpmforge ever has a newer version of one of the clamav packages, and anyone runs yum update
, the dependencies will again stop resolving (because rpmforge and virtualmin repositories do not have a symbiotic relationship). To disable rpmforge, edit /etc/yum.repos.d/rpmforge.repo
and add/replace enabled=0
to the [rpmforge]
section. Also note, that anytime you want to explicitly use rpmforge, you can do yum --disablerepo=* --enablerepo=rpmforge
(or if you want to use it in conjunction with other enabled repositories, remove the –disablerepo flag).