安装错误的deb导致apt不能安装了


今天安装了一个微信Linux (Debian 系) 安装官方微信(Electron版)

dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
(Reading database ... 162631 files and directories currently installed.)
Removing weixin (2.1.1) ...
mv: cannot stat '/etc/lsb-release-test': No such file or directory
dpkg: error processing package weixin (--remove):
 installed weixin package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 weixin

解决办法

sudo dpkg –configure -a
sudo rm /var/lib/dpkg/info/*.postrm
sudo rm / var/lib/dpkg/info/*.list
sudo apt-get clean all
sudo apt-get update
sudo apt-get upgrade
sudo apt install --reinstall 包名或者本地deb

声明:小小博客|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - 安装错误的deb导致apt不能安装了


Carpe Diem and Do what I like