当我试图删除postfix时,我会得到以下错误:
Removing postfix (3.1.0-3) ...
Failed to stop postfix.service: Unit postfix.service not loaded.
invoke-rc.d: initscript postfix, action "stop" failed.
dpkg: error processing package postfix (--remove):
subprocess installed pre-removal script returned error exit status 5
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)发布于 2018-11-28 07:21:18
这对我起了作用:
创建后缀文件后,运行以下命令:
sudo apt-get purge postfix 然后重新安装后缀:
sudo apt-get --reinstall install postfix发布于 2016-06-20 08:52:54
原因是因为/etc/init.d/postfix不存在。
我创建了一个空白的/etc/init.d/postfix文件,并使用sudo chmod +x /etc/init.d/postfix使其可执行,然后解决了问题。
https://askubuntu.com/questions/789235
复制相似问题