我有一个运行Ubuntu18.04LTS的服务器。今天早上,我运行了一个apt upgrade,在运行过程中,服务器失去了动力。一旦它被恢复,我登录并注意到有两个软件包“没有完全安装或删除”。我试着运行apt-get autoremove、显式apt-get remove命令,并在网上找到了许多我现在不记得的解决方案。
似乎什么都没有帮助,而且我无法升级/安装软件包,因为我对损坏的软件包有很大的错误。它们是内核包:
linux-image-4.15.0-50-generic
linux-image-4.15.0-51-generic下面是apt-get autoremove的输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-4.15.0-50-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 8,323 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 144087 files and directories currently installed.)
Removing linux-image-4.15.0-50-generic (4.15.0-50.54) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-50-generic
/etc/kernel/postrm.d/x-grub-legacy-ec2:
Searching for GRUB installation directory ... found: /boot/grub
/etc/default/grub: line 12: net.ifnames=0: command not found
run-parts: /etc/kernel/postrm.d/x-grub-legacy-ec2 exited with return code 127
dpkg: error processing package linux-image-4.15.0-50-generic (--remove):
installed linux-image-4.15.0-50-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-50-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)发布于 2019-06-16 17:30:19
在手动删除apt-get autoremove文件之后运行一系列.deb和apt-get autoclean命令似乎已经清除了它。
https://askubuntu.com/questions/1151535
复制相似问题