子进程安装的预删除脚本返回错误退出状态 5

子进程安装的预删除脚本返回错误退出状态 5

尝试获取clamavclamav-daemon卸载但似乎卡住了aptdpkg​​且没有出现此错误则无法完成:

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脚本能接受它并继续。但都无济于事,我也没主意了。

任何帮助是极大的赞赏。

答案1

您可以在以下路径中找到预删除脚本。

/var/lib/dpkg/info/clamav-daemon.prerm

您应该能够编辑此脚本以删除失败的部分。或者,您可以完全删除该脚本,但这可能会跳过其他清理步骤。

相关内容