![如何删除失败的 dpkg .deb 安装](https://linux22.com/image/871407/%E5%A6%82%E4%BD%95%E5%88%A0%E9%99%A4%E5%A4%B1%E8%B4%A5%E7%9A%84%20dpkg%20.deb%20%E5%AE%89%E8%A3%85.png)
我尝试使用dpkg -i
命令安装 .deb 文件。但是安装失败,当我尝试时sudo apt-get install -f
只收到此错误:
--
Installing init scripts.
Sweet! Please run `prey config gui` to finish installation.
Voila! All good.
dpkg: error processing package prey (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
prey
E: Sub-process /usr/bin/dpkg returned an error code (1)
现在,当我尝试运行任何 apt-get 命令时,它都会以这个错误结束,有什么方法可以阻止 apt-get 尝试完成安装吗?
的输出 cat /var/lib/dpkg/status |grep prey
是
Package: prey
Source: prey
Provides: prey
Homepage: http://preyproject.com
答案1
这将清除损坏的软件包和配置文件
sudo apt-get purge prey