首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >已安装的子进程预删除脚本返回错误退出状态5

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

Server Fault用户
提问于 2018-01-31 00:00:37
回答 1查看 6.6K关注 0票数 2

试图卸载clamavclamav-daemon,但似乎aptdpkg被卡住了,如果没有这个错误,什么事情都无法完成:

dpkg --remove输出:

代码语言:javascript
复制
(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命令都会将以下内容添加到末尾:

代码语言:javascript
复制
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的假文件,希望脚本能够接受它并继续。什么都帮不上忙,我也没办法了。

任何帮助都是非常感谢的。

EN

回答 1

Server Fault用户

回答已采纳

发布于 2018-01-31 11:43:37

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

代码语言:javascript
复制
/var/lib/dpkg/info/clamav-daemon.prerm

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

票数 4
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/894878

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档