由于 grub.cfg 文件中的语法错误,无法安装任何应用程序

由于 grub.cfg 文件中的语法错误,无法安装任何应用程序

我在使用“sudo update-grub”时遇到了这个错误

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.13.0-48-generic
Found initrd image: /boot/initrd.img-5.13.0-48-generic
Found linux image: /boot/vmlinuz-5.13.0-44-generic
Found initrd image: /boot/initrd.img-5.13.0-44-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows Recovery Environment on /dev/sda1
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 329
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.

grub.cfg.new 文件位于此处:https://pastebin.com/pgiczCXZ 。现在因为这个错误,我无法安装任何新东西。我不知道哪里出了问题。任何帮助都将不胜感激。谢谢阅读! 更新:我设法使用@nobody 方法修复了这个问题。如果你有同样的问题,请重新考虑!

相关内容