How can I fix this dependency error when updating clamav using yum?
My first guess would be that you're mixing YUM repositories. Notice that the RPM for clamav as a .rf.
in its name which signifies that it's a rpmforge package. I'd confirm that clamd also is a rpmforge package and not coming from one of the other repos.
The error message is basically telling you this, saying that it can't find an appropriate package, clamd...rf...
.
Focus only on rpmforge repo
You can disable every repo temporarily and enable just the rpmforge repo like this:
$ yum --disablerepo=\* --enablerepo=rpmforge update clam\*
The above command will allow yum to do an update against just the one repo (rpmforge).
Duplicate RPMs
If you encounter duplicate versions of the clam*
RPMS installed as the OP experienced the following command can be used to identify the situation:
$ yum list clam\*
clamav.i386 0.97.6-1.el5.rf installed
clamav.i386 0.97.7-1.el5.rf installed
clamav-db.i386 0.97.6-1.el5.rf installed
clamav-db.i386 0.97.7-1.el5.rf installed
clamd.i386 0.97.6-1.el5.rf installed
clamd.i386 0.97.7-1.el5.rf
...
...
This command will resolve that issue by removing the duplicate packages:
$ yum --disablerepo=\* --enablerepo=rpmforge remove clam\*-0.97.6-1.el5.rf
References
Related videos on Youtube
Muhammad Hamza Nisar
Updated on September 18, 2022Comments
-
Muhammad Hamza Nisar over 1 year
I'm trying to update
clamav
on an old CentOS 5 mail server installation, but keep getting a dependency error which I can't understand.I followed the method described here.
Perhaps someone can show me the way through this?
[root@s1 ~]# yum list clamav Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * base: centos.mirror.facebook.net * extras: centos-distro.cavecreek.net * rpmforge: mirror.hmc.edu * updates: mirror.thelinuxfix.com base | 1.1 kB 00:00 dag | 1.9 kB 00:00 extras | 2.1 kB 00:00 rpmforge | 1.9 kB 00:00 updates | 1.9 kB 00:00 Excluding Packages in global exclude list Finished Installed Packages clamav.i386 0.97.6-1.el5.rf installed clamav.i386 0.97.7-1.el5.rf installed [root@s1 ~]# [root@s1 ~]# yum update clamav Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * base: centos.mirror.facebook.net * extras: centos-distro.cavecreek.net * rpmforge: mirror.hmc.edu * updates: mirror.thelinuxfix.com base | 1.1 kB 00:00 dag | 1.9 kB 00:00 extras | 2.1 kB 00:00 rpmforge | 1.9 kB 00:00 updates | 1.9 kB 00:00 Excluding Packages in global exclude list Finished Setting up Update Process Resolving Dependencies --> Running transaction check --> Processing Dependency: clamav = 0.97.6-1.el5.rf for package: clamd ---> Package clamav.i386 0:0.97.7-1.el5.rf set to be updated --> Finished Dependency Resolution clamd-0.97.6-1.el5.rf.i386 from installed has depsolving problems --> Missing Dependency: clamav = 0.97.6-1.el5.rf is needed by package clamd-0.97.6-1.el5.rf.i386 (installed) Error: Missing Dependency: clamav = 0.97.6-1.el5.rf is needed by package clamd-0.97.6-1.el5.rf.i386 (installed) 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 [root@s1 ~]#
The above results are obtained after running the suggested:
package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest
I ran
yum --disablerepo=\* --enablerepo=rpmforge update clam\*
in accordance with an answer and received the following terminal output:[root@s1 ~]# yum --disablerepo=\* --enablerepo=rpmforge update clam\* Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * rpmforge: mirror.hmc.edu rpmforge | 1.9 kB 00:00 Excluding Packages in global exclude list Finished Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package clamav.i386 0:0.97.7-1.el5.rf set to be updated ---> Package clamav-db.i386 0:0.97.7-1.el5.rf set to be updated ---> Package clamd.i386 0:0.97.7-1.el5.rf set to be updated --> Finished Dependency Resolution Dependencies Resolved =============================================================================================================== Package Arch Version Repository Size =============================================================================================================== Updating: clamav i386 0.97.7-1.el5.rf rpmforge 2.2 M clamav-db i386 0.97.7-1.el5.rf rpmforge 34 M clamd i386 0.97.7-1.el5.rf rpmforge 243 k Transaction Summary =============================================================================================================== Install 0 Package(s) Upgrade 3 Package(s) Total download size: 37 M Is this ok [y/N]: y Downloading Packages: (1/3): clamd-0.97.7-1.el5.rf.i386.rpm | 243 kB 00:00 (2/3): clamav-0.97.7-1.el5.rf.i386.rpm | 2.2 MB 00:00 (3/3): clamav-db-0.97.7-1.el5.rf.i386.rpm | 34 MB 00:03 --------------------------------------------------------------------------------------------------------------- Total 9.0 MB/s | 37 MB 00:04 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Check Error: package clamav-db-0.97.7-1.el5.rf.i386 is already installed package clamd-0.97.7-1.el5.rf.i386 is already installed package clamav-0.97.7-1.el5.rf.i386 is already installed Error Summary ------------- [root@s1 ~]#
Installed packages, according to
yum list clam\*
are:clamav.i386 0.97.6-1.el5.rf installed clamav.i386 0.97.7-1.el5.rf installed clamav-db.i386 0.97.6-1.el5.rf installed clamav-db.i386 0.97.7-1.el5.rf installed clamd.i386 0.97.6-1.el5.rf installed clamd.i386 0.97.7-1.el5.rf installed Available Packages clamav-devel.i386 0.97.7-1.el5.rf dag clamav-milter.i386 0.97.7-1.el5.rf dag clamtk.i386 3.09-1.el5.rf dag clamtk.noarch 4.25-1.el5.rf dag
Why am I still seeing
0.97.6-1.el5.rf
in the list?-
Muhammad Hamza Nisar almost 11 years@slm It's 64 bit.
-
Muhammad Hamza Nisar almost 11 years@sim CentOS 5. I have no idea whether rpmforge was added by me, CentOS or the server provisioning, but it seems that that was where it was obtained. Just need to upgrade it though.
-
slm almost 11 yearsSo the million dollar question is what happens when you give the command
yum --disablerepo=\* --enablerepo=rpmforge remove clam\*-0.97.6-1.el5.rf
? -
Muhammad Hamza Nisar almost 11 yearsI reckon that has completed the answer. All went smoothly. If you'd like to update your answer, I'll be pleased to accept it.
-
slm almost 11 yearsUpdated my answer, glad to help you out of your predicament 8-).
-
-
Muhammad Hamza Nisar almost 11 yearsI've just tried both commands above but the error message is identical to the above for both of them. According to
yum list clamav
I have 2 installed and they are both.rf
packages and bewilderingly,clamav = 0.97.6-1.el5.rf is needed by package clamd-0.97.6-1.el5.rf.i386 (installed)
-
Muhammad Hamza Nisar almost 11 yearsI've just checked the origin of clamd using
yum list clamd
and both of the two showing as installed are rpmforge packages also. -
slm almost 11 yearsYeah in CentOS 6 it became a standard offering from the el6 repos. My CentOS 5 boxes are showing it coming from rpmforge so that isn't the issue.
-
Muhammad Hamza Nisar almost 11 yearsI've updated my question with the result of trying your latest edit.