每次我尝试使用以下方法重新安装 iptables/ufw 时都会出现错误apt-get install --reinstall iptables/ufw
我的终端显示的内容如下:
sudo apt-get install --reinstall iptables Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
netfilter-persistent
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 5 not upgraded.
2 not fully installed or removed.
Need to get 0 B/266 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 35967 files and directories currently installed.)
Preparing to unpack .../iptables_1.6.0-2ubuntu3_amd64.deb ...
Unpacking iptables (1.6.0-2ubuntu3) over (1.6.0-2ubuntu3) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up iptables (1.6.0-2ubuntu3) ...
Setting up ufw (0.35-0ubuntu2) ...
insserv: warning: script 'ts3anticrash.sh' missing LSB tags and overrides
insserv: There is a loop between service monit and ts3anticrash.sh if stopped
insserv: loop involving service ts3anticrash.sh at depth 2
insserv: loop involving service monit at depth 1
insserv: Stopping ts3anticrash.sh depends on monit and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package ufw (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up netfilter-persistent (1.0.4) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
insserv: warning: script 'ts3anticrash.sh' missing LSB tags and overrides
insserv: There is a loop between service monit and ts3anticrash.sh if stopped
insserv: loop involving service ts3anticrash.sh at depth 2
insserv: loop involving service monit at depth 1
insserv: Stopping ts3anticrash.sh depends on monit and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package netfilter-persistent (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
ufw
netfilter-persistent
E: Sub-process /usr/bin/dpkg returned an error code (1)