
我發現安裝/刪除/升級半安裝的 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