cop*_*ser 2 upgrade updates package-management apt dpkg
我正在尝试gitlab-ce从我的系统中删除,因为我不需要它而且我无法做到这一点,首先我尝试了这个:
sudo apt-get --remove autoremove gitlab-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
gitlab-ce
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 1076 MB disk space will be freed.
Do you want to continue? [Y/n] Y
dpkg: error processing package gitlab-ce (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
gitlab-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
然后我尝试了这个
sudo dpkg --purge gitlab-ce
dpkg: error processing package gitlab-ce (--purge):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
gitlab-ce
Run Code Online (Sandbox Code Playgroud)
系统一直要求我重新安装应用程序,我不想要它,首先我尝试使用更新我的系统,sudo apt-get update && sudo apt-get dist-upgrade因为我看到我的更新无法正常工作,所以最后我被留下了有一些损坏的dpkg包,所以我需要解决这个问题,现在我试图从我的系统中删除这个被遗弃的应用程序,那么我该怎么做才能将它从我的系统中清除。
我已经接受了@waltinator 的回答,因为通过阅读man dpkg我想出了一个解决方案
sudo dpkg --remove --force-all gitlab-ce
我知道最好的解决方案是reinstall应用程序,但我遇到了麻烦,这个命令帮助了我,但我建议人们尝试reinstall使用remove/purge它之前的应用程序。
| 归档时间: |
|
| 查看次数: |
21546 次 |
| 最近记录: |