dpkg
使用时出现此错误apt-get upgrade
:
dpkg: error processing package bash (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
bash
E: Sub-process /usr/bin/dpkg returned an error code (1)
我应该怎么办?
答案1
我在 Ubuntu 16.04 LTS 上通过 SSH 运行的命令是
sudo apt-get install --reinstall bash
至少这样我就不用担心完全删除狂欢
答案2
完全删除 bash 并重新开始工作:
sudo dpkg --remove --force-remove-reinstreq bash
(此命令强制删除 bash)
然后您可以尝试再次安装:
sudo apt-get install bash
另请参见这里,有一个类似的问题:包裹处于非常糟糕的不一致状态