![子进程 /usr/bin/dpkg 返回错误代码 (1)](https://linux22.com/image/587103/%E5%AD%90%E8%BF%9B%E7%A8%8B%20%2Fusr%2Fbin%2Fdpkg%20%E8%BF%94%E5%9B%9E%E9%94%99%E8%AF%AF%E4%BB%A3%E7%A0%81%20(1).png)
嘿朋友们,当我尝试清除 Shorewall 时,出现了以下错误
root@aptosid:/etc# apt-get purge shorewall
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
shorewall*
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 1,843 kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 212702 files and directories currently installed.)
Removing shorewall ...
: not found/shorewall: 25: /etc/default/shorewall: :q
Stopping "Shorewall firewall": not done (check /var/log/shorewall-init.log).
invoke-rc.d: initscript shorewall, action "stop" failed.
dpkg: error processing shorewall (--purge):
subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
Errors were encountered while processing:
shorewall
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@aptosid:/etc#
请帮帮我......?
答案1
看起来安装搞砸了,一些配置文件丢失了。如果你这样做,也许可以让它继续
touch /etc/default/shorewall
但更有可能的是,您需要重新安装该软件包才能恢复丢失的配置,然后清除它。要重新安装它,您需要执行
apt-get install --reinstall shorewall