试图卸载clamav和clamav-daemon,但似乎apt和dpkg被卡住了,如果没有这个错误,什么事情都无法完成:
dpkg --remove输出:
(Reading database ... 385080 files and directories currently installed.)
Removing clamav-daemon (0.99.2+dfsg-0ubuntu0.16.04.2) ...
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
/usr/bin/deb-systemd-helper: error: unable to read clamav-daemon.service
/usr/bin/deb-systemd-helper: error: unable to read clamav-daemon.socket
Errors were encountered while processing:
clamav-daemon任何类型的apt命令都会将以下内容添加到末尾:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
clamav-daemon : Depends: clamav-base (= 0.99.2+dfsg-0ubuntu0.16.04.2) but 0.99.3+addedllvm-0ubuntu0.16.04.1 is installed
Recommends: clamdscan but it is not installed
E: Unmet dependencies. Try using -f.我试过apt -f install,尝试dpkg --configure -a,尝试安装,然后删除,尝试制作名为clamav-daemon.service/socket的假文件,希望脚本能够接受它并继续。什么都帮不上忙,我也没办法了。
任何帮助都是非常感谢的。
发布于 2018-01-31 11:43:37
在下面的路径中可以找到预删除脚本。
/var/lib/dpkg/info/clamav-daemon.prerm您应该能够编辑此脚本以删除正在失败的部分。或者,您可以完全删除脚本,但这可能跳过其他清理步骤。
https://serverfault.com/questions/894878
复制相似问题