升级 ubuntu 18.04 时出错

升级 ubuntu 18.04 时出错

嗨,我尝试升级,结果如下。你能帮助我吗?抱歉,我对 Ubuntu 不太熟悉,所以我希望我能理解你的回答。谢谢!

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up grub-pc (2.02-2ubuntu8.6) ...
/var/lib/dpkg/info/grub-pc.config: 34: /etc/default/grub: Syntax error: EOF in backquote substitution
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 2
Setting up linux-image-4.15.0-36-generic (4.15.0-36.39) ...
Processing triggers for linux-image-4.15.0-36-generic (4.15.0-36.39) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.15.0-36-generic
/etc/kernel/postinst.d/zz-update-grub:
/usr/sbin/grub-mkconfig: 34: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-4.15.0-36-generic (--configure):
 installed linux-image-4.15.0-36-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 grub-pc
 linux-image-4.15.0-36-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

输出cat /etc/default/grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="ipv6.disable=1""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

答案1

我发现了有问题的一行:

GRUB_CMDLINE_LINUX="ipv6.disable=1""

您有两个结束语。

编辑该行,删除最后一句引文:

GRUB_CMDLINE_LINUX="ipv6.disable=1"

然后继续安装sudo apt-get install -f

相关内容