
削除しようとすると、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)
答え1
理由は/etc/init.d/postfix
存在しなかったからです。
空のファイルを作成し/etc/init.d/postfix
、 を使用して実行可能にするsudo chmod +x /etc/init.d/postfix
と、問題は解決しました。
答え2
これは私にとってはうまくいきました:
postfix ファイルを作成したら、次のコマンドを実行します。
sudo apt-get purge postfix
その後、postfixを再インストールします。
sudo apt-get --reinstall install postfix