由于内核原因,无法使用 dpkg 或更新任何内容

由于内核原因,无法使用 dpkg 或更新任何内容

从今天起,我注意到由于未知错误,我无法安装 gparted 甚至无法检查更新。我所知道的只是内核不允许被删除,并停止我尝试在终端中运行的任何进程。我试过强制删除。我还想提一下,我的操作系统看不到 grub?

这是输出。

有人可以向我解释发生了什么事以及如何解决这个问题吗?

Setting up grub-pc (2.06-2ubuntu12.1) ...

/var/lib/dpkg/info/grub-pc.config: 12: /etc/default/grub: Usage:: not found
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 127
Setting up linux-image-5.19.0-26-generic (5.19.0-26.27) ...
Setting up linux-image-5.15.0-56-generic (5.15.0-56.62) ...
dpkg: dependency problems prevent configuration of grub-efi-amd64-signed:
 grub-efi-amd64-signed depends on grub-efi-amd64 | grub-pc; however:
  Package grub-efi-amd64 is not installed.
  Package grub-pc is not configured yet.

dpkg: error processing package grub-efi-amd64-signed (--configure):
 dependency problems - leaving unconfigured
Processing triggers for linux-image-5.19.0-26-generic (5.19.0-26.27) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.19.0-26-generic
   ...done.
/etc/kernel/postinst.d/dracut:
dracut: Generating /boot/initrd.img-5.19.0-26-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 12: /etc/default/grub: Usage:: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.19.0-26-generic (--configure):
 installed linux-image-5.19.0-26-generic package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.15.0-56-generic (5.15.0-56.62) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-56-generic
   ...done.
/etc/kernel/postinst.d/dracut:
dracut: Generating /boot/initrd.img-5.15.0-56-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 12: /etc/default/grub: Usage:: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.15.0-56-generic (--configure):
 installed linux-image-5.15.0-56-generic package post-installation script subprocess returned error exit status 1

**Errors were encountered while processing:
 grub-pc
 grub-efi-amd64-signed
 linux-image-5.19.0-26-generic
 linux-image-5.15.0-56-generic 

这是我完全无法理解的

相关内容