
將 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來嘗試你的建議。我會將這個問題保留幾天,然後再刪除。