我正在尝试更新clamav
旧的 CentOS 5 邮件服务器安装,但不断收到我无法理解的依赖项错误。
我按照描述的方法进行操作这里。
也许有人可以告诉我解决这个问题的方法?
[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 ~]#
运行提示后得到以上结果:
package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
我yum --disablerepo=\* --enablerepo=rpmforge update clam\*
按照答案运行并收到以下终端输出:
[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 ~]#
安装的软件包,根据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 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
为什么我仍然0.97.6-1.el5.rf
在列表中看到?
答案1
我的第一个猜测是你正在混合 YUM 存储库。请注意,clamav 的 RPM.rf.
在其名称中为 a,这表示它是一个 rpmforge 软件包。我确认 clamd 也是一个 rpmforge 软件包,而不是来自其他存储库之一。
错误消息基本上是在告诉您这一点,说它找不到合适的包clamd...rf...
。
只关注 rpmforge 仓库
您可以暂时禁用每个存储库并仅启用 rpmforge 存储库,如下所示:
$ yum --disablerepo=\* --enablerepo=rpmforge update clam\*
上述命令将允许 yum 仅针对一个存储库 (rpmforge) 进行更新。
重复的 RPM
如果您遇到作为 OP 所安装的 RPMS 的重复版本clam*
,可以使用以下命令来识别情况:
$ 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
...
...
此命令将通过删除重复的包来解决该问题:
$ yum --disablerepo=\* --enablerepo=rpmforge remove clam\*-0.97.6-1.el5.rf