Невозможно выполнить «sudo apt upgrade»: подпроцесс / usr / bin / dpkg вернул код ошибки (1)

Каждый раз, когда я пытаюсь выполнить выполнить sudo apt 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.
Need to get 0 B/8978 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-5.4.0-77-generic (5.4.0-77.86) ...
Processing triggers for linux-image-5.4.0-77-generic (5.4.0-77.86) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-77-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 36: /etc/default/grub: Syntax error: Unterminated quoted string
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-5.4.0-77-generic (--configure):
 installed linux-image-5.4.0-77-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-5.4.0-77-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я интерпретирую вывод, что все установлено, за исключением двух пакетов, которые «не полностью установлены или удалены».

Когда я пытаюсь выполнить sudo apt autoremove , я получаю следующий результат:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-5.4.0-73-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 11.8 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 109583 files and directories currently installed.)
Removing linux-image-5.4.0-73-generic (5.4.0-73.82) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.4.0-73-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 36: /etc/default/grub: 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-5.4.0-73-generic (--remove):
 installed linux-image-5.4.0-73-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.4.0-73-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я также пробовал после , но это не помогает. Как мне решить эту проблему?

Изменить: / 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=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

# 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

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

GRUB_CMDLINE_LINUX="libata.force=noncq

Я удалил GRUB_CMDLINE_LINUX = "libata.force = noncq теперь все снова работает нормально . Большое спасибо за вашу помощь!

0
задан 29 June 2021 в 23:30

1 ответ

Я не знаю, что должна делать эта строка из / etc / default / grub, но для нее нужна конечная цитата

GRUB_CMDLINE_LINUX = "libata.force = noncq

Сообщалось об ошибке

] / etc / default / grub: синтаксическая ошибка: незавершенная строка в кавычках

(примечание в скобках: после редактирования / etc / default / grub вам необходимо выполнить команду sudo update-grub , чтобы внести изменения . После того, как вы отредактировали / etc / default / grub, чтобы внести это изменение, вы либо не вводили команду, либо проигнорировали возникшие ошибки)

2
ответ дан 28 July 2021 в 11:23

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

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