将 20.04 升级到 22.04 后,我无法安装新软件,因为无法删除旧的 linux-image-5.13.0-23-generic (5.13.0-23.23)。在升级过程中,我告诉系统保留旧内容,这可能是导致此问题的原因。当我尝试安装新软件时,我收到以下输出:
Removing linux-image-5.13.0-23-generic (5.13.0-23.23) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.13.0-23-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-23-generic (--remove):
subprocess package linux-image-5.13.0-23-generic install script post-removal d returned error value 1
dpkg: too many errors; stopped
Errors found while processing: linux-image-5.13.0-23-generic
Processing was aborted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试了 sudo apt-get --purge remove linux-image-5.13.0-23-generic 和 sudo apt-get install -f 但得到与上面相同的输出。
谢谢。不幸的是,我不得不重新安装 Ubuntu 22.04,因为我感染了木马,并且由于这个内核问题无法安装 ClamAV。我不敢使用 ubuntu 来尝试你的建议。我会把这个问题搁置几天再删除它。