在完成sudo apt-get upgrade时遇到以下错误:
dpkg: error processing package apache2-utils (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
apache2-utils
E: Sub-process /usr/bin/dpkg returned an error code (1)我也无法移除它。
dpkg: error processing package apache2-utils (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
dpkg: too many errors, stopping
Errors were encountered while processing:
apache2-utils
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)ubuntu 22
我怎样才能解决这个问题?
编辑:
试着重新安装它。
sudo apt-get install apache2-utils 凯的数独密码:读取软件包列表..。完成建立依赖树..。阅读状态信息..。Deadapache2-utils已经是最新版本(2.4.52-1ubuntu4.4)。以下软件包已自动安装,不再需要: libllvm13 libllvm13 13:i 386 libvulkan1 1:i 386 libxcb-r0:i 386 mesa驱动程序:i 386使用'sudo apt自动删除‘删除它们。升级0,新安装0,删除0,不升级12。1未完全安装或拆卸。需要获得0 B/89.5 kB的档案。在此操作之后,将使用0 B的额外磁盘空间。要继续吗?Y/n Y dpkg:错误处理包apache2-utils (--配置):包处于非常糟糕的不一致状态;在处理过程中遇到配置错误之前,应该重新安装它: apache2-utils E: processing /usr/bin/dpkg返回错误代码(1)。
发布于 2023-04-10 10:46:17
重新安装与安装不同,您需要运行
sudo apt-get reinstall apache2-utils在您的情况下运行apt-get install没有帮助:apt-get看到包已经安装了,并且不再安装它。reinstall强制它重新安装,替换丢失的文件等。
https://unix.stackexchange.com/questions/742310
复制相似问题