clamav-daemon.socket 的问题

clamav-daemon.socket 的问题

我正在尝试更新我的clamav,但我已经尝试了所有我知道的方法,但都无济于事。我一直收到此类错误消息。任何帮助我都非常感谢。

我也尝试了网上能找到的所有方法(删除、清除、重新安装),但都无济于事。请帮忙…… :( 它也阻止我安装其他程序。

终端:

root@dell-Latitude-D630:/home/dell# apt-get -f install clamav-daemon
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  clamav-docs daemon
Recommended packages:
  clamdscan
The following packages will be upgraded:
  clamav-daemon
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
13 not fully installed or removed.
Need to get 0 B/200 kB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 675823 files and directories currently installed.)
Preparing to unpack .../clamav-daemon_0.99.2+dfsg-0ubuntu0.16.04.1_i386.deb ...
Failed to stop clamav-daemon.socket: Unit clamav-daemon.socket not loaded.
dpkg: warning: subprocess old pre-removal script returned error exit status 5
dpkg: trying script from the new package instead ...
Failed to stop clamav-daemon.socket: Unit clamav-daemon.socket not loaded.
dpkg: error processing archive /var/cache/apt/archives/clamav-daemon_0.99.2+dfsg-0ubuntu0.16.04.1_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 5
insserv: warning: script 'K01maldet' missing LSB tags and overrides
insserv: warning: script 'maldet' missing LSB tags and overrides
Failed to start clamav-daemon.service: Unit clamav-daemon.socket is not loaded properly: Invalid argument.
See system logs and 'systemctl status clamav-daemon.service' for details.
invoke-rc.d: initscript clamav-daemon, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/clamav-daemon_0.99.2+dfsg-0ubuntu0.16.04.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@dell-Latitude-D630:/home/dell# 

root@dell-Latitude-D630:/home/dell# sudo dpkg --remove --force-remove-reinstreq clamav-daemon
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
(Reading database ... 675758 files and directories currently installed.)
Removing clamav-daemon (0.99+dfsg-1ubuntu1.1) ...
Failed to stop clamav-daemon.socket: Unit clamav-daemon.socket not loaded.
dpkg: error processing package clamav-daemon (--remove):
 subprocess installed pre-removal script returned error exit status 5
Errors were encountered while processing:
 clamav-daemon
root@dell-Latitude-D630:/home/dell# 

答案1

感谢 bodhi.zazen 的帮助,我最终解决了这个问题。

有效的方法:

su
cd /var/lib/dpkg/info
rm clamav*
apt purge clamav*
apt-get install clamav

这解决了我的问题,现在 clamav 可以再次运行,并且我现在可以安装其他程序。

答案2

我是 Linux 的低级用户,所以当我最近更新到 Ubuntu Server 17.04 时,我相信是 Clamav 和一些其他库被应用了。如果我没记错的话,Clamav 已经更新到 0.9.3,但我可能错了。

无论如何,我在 postfix 中遇到了 Unix Socket 丢失错误,并进行了检查,是的,/run/clamav/clamd.ctl 不是它们的,重新启动但仍然相同,并且 clamav 无法在没有警告的情况下在邮件服务器上运行并尝试寻找备份替代方案。

我花了整整两天时间研究和应用了各个小组列出的所有补救措施,但无论我怎么尝试都无法解决问题。甚至那些据称有效的修复方法也失败了。

我有一个单独的备份驱动器,其中包含 CloneZilla 图像以及一个包含 CPIO 文件备份的文件夹,使用以下命令。

服务器 1# find . -mount -print | cpio -pdumv /BACKUP/TLCSMail_Backup_17.04LTS

我会定期更新此内容,因为有更改/更新应用。现在我准备重新安装 CloneZilla 映像,因为大约一个月前我从 16.10LTS 升级到了 17.04LTS,但我不会那么激进,只需安装 /BACKUP 驱动器并使用以下命令 RESTORE /etc 并重新启动,看看会发生什么,这样就没什么损失了。

cd/BACKUP/TLCSMail_Backup_17.04LTS

CD 等

查找 . -mount -print | cpio -pdumv /etc

令我惊讶的是,尽管系统处于活动状态,但它并没有影响系统,我重新启动后,一切恢复正常。我执行了 apt 更新,然后执行了 apt 升级,无需进行任何更改或添加。

Clamav 再次升级到 0.9.2 版本,postfix 运行非常顺畅。它已经运行了 2.5 天,没有任何问题。

希望我早点尝试一下并省去很多痛苦,但我想学习......希望这对遇到这个问题的其他人有所帮助,我真的不赞成禁用 Clamav,因为有些帖子表明要解决这个问题,长期以来,Linux 和 Apple 系统公然传播病毒,以威慑 Windows 用户和系统。

向 Terry Lamb 致以最诚挚的问候。

相关内容