![PostFix 安装损坏](https://linux22.com/image/858796/PostFix%20%E5%AE%89%E8%A3%85%E6%8D%9F%E5%9D%8F.png)
我意外删除了 Postfix 需要的一些文件,现在它无法安装或卸载,已尝试:
sudo apt-get purge postfix
sudo apt-get remove postfix
sudo apt-get upgrade
sudo apt-get install postfix
sudo apt-get autoremove postfix
sudo apt-get remore --auto-remove postfix
无论我做什么,我总是收到以下错误:
root@GitLab:/# sudo apt-get remove postfix
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
postfix
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 3,361 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 99428 files and directories currently installed.)
Removing postfix (2.11.0-1) ...
invoke-rc.d: unknown initscript, /etc/init.d/postfix not found.
dpkg: error processing package postfix (--remove):
subprocess installed pre-removal script returned error exit status 100
/var/lib/dpkg/info/postfix.postinst: 13: .: Can't open /usr/share/postfix/postinst.functions
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
编辑:按照本指南操作并修复: http://blog.bodhizazen.com/linux/apt-get-how-to-fix-very-broken-packages/