Проблема обновления ядра

Я использую Ubuntu 21.04 на ядре Версия 5.11.0-22-generic. Сегодня он автоматически обновил мой драйвер NVIDIA, и с тех пор, когда sudo apt upgrade , я получаю:

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
amd64-microcode intel-microcode iucode-tool linux-headers-generic-hwe-20.04 thermald
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-image-5.11.0-25-generic
Suggested packages:
  fdutils linux-doc | linux-source-5.11.0 linux-tools
  linux-modules-extra-5.11.0-25-generic
The following packages will be REMOVED:
  linux-image-unsigned-5.11.0-25-generic
The following NEW packages will be installed:
  linux-image-5.11.0-25-generic
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/11,4 MB of archives.
After this operation, 234 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: linux-image-unsigned-5.11.0-25-generic: dependency problems, but removing 
anyway as you requested:
linux-modules-5.11.0-25-generic depends on linux-image-5.11.0-25-generic | linu
x-image-unsigned-5.11.0-25-generic; however:
  Package linux-image-5.11.0-25-generic is not installed.
  Package linux-image-unsigned-5.11.0-25-generic is to be removed.

(Reading database ... 285850 files and directories currently installed.)
Removing linux-image-unsigned-5.11.0-25-generic (5.11.0-25.27) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.11.0-25-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/00_header: 451: Syntax error: Unterminated quoted string
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-unsigned-5.11.0-25-generic (--remove):
 installed linux-image-unsigned-5.11.0-25-generic package post-removal script su
bprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-unsigned-5.11.0-25-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
1
задан 21 July 2021 в 17:13

1 ответ

Вы должны исправить цитату внутри 42 строки.

Используйте следующую однострочную строку ниже:

sudo sed -i 's|GRUB_GFXPAYLOAD}" = "x |GRUB_GFXPAYLOAD}" = "x" |' /etc/grub.d/00_header

затем снова запустите sudo update-grub .

3
ответ дан 28 July 2021 в 11:16

Другие вопросы по тегам:

Похожие вопросы: