删除包时出错

删除包时出错

我尝试使用以下方法删除软件包

sudo apt autoremove

但它显示以下错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-4.4.0-128-generic (4.4.0-128.154) ...
Internal Error: Could not find image (/boot/vmlinuz-4.4.0-128-generic)
dpkg: error processing package linux-image-4.4.0-128-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-128-generic:
 linux-image-extra-4.4.0-128-generic depends on linux-image-4.4.0-128-generic; however:
  Package linux-image-4.4.0-128-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-128-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 linux-image-4.4.0-128-generic
 linux-image-extra-4.4.0-128-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

错误是什么?

答案1

我相信错误确实如它看上去的那样;dpkg在运行过程中以某种方式被打断了。

解决该问题的方法是运行两个命令:sudo apt install -fsudo dpkg --configure -a分别来解决您的问题。

相关内容