我发现安装/删除/升级半安装的 kibana 软件包很麻烦。我可能以错误的方式编辑了 kibana.yml 文件,无法让它恢复工作。
[09:32] ***-VM:cache$ sudo apt-get --purge remove kibana
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
kibana*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 124 MB disk space will be freed.
Do you want to continue? [Y/n] Y
dpkg: error processing package kibana (--purge):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
kibana
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
您可以使用以下方法来解决这种情况:
重新安装然后删除
sudo apt-get install --reinstall kibana sudo apt-get remove kibana
单独移除而不清除
sudo apt-get remove kibana
强制安装和删除
sudo apt-get -f install sudo apt-get remove --purge kibana
强制移除
dpkg
sudo dpkg -r --force kibana