Ошибка обновления sudo apt 18.04 (сломанные пакеты)

Только что завершил обновление с 17.10 по 18.04 и не может обновить или получить какие-либо новые пакеты.

Ниже приведена ошибка, которую я получаю от sudo apt upgrde:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  gnome-tweak-tool libboost-chrono1.62.0 libboost-program-options1.62.0 libopencv-core3.1 libopencv-imgproc3.1 libsodium18
  libtbb2 libva-drm1 libva-wayland1 libva-x11-1 libva1 libx264-148 libx265-130 linux-headers-4.13.0-21
  linux-headers-4.13.0-21-generic linux-image-4.13.0-21-generic linux-image-extra-4.13.0-21-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 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-efi-amd64 (2.02-2ubuntu8.13) ...
/var/lib/dpkg/info/grub-efi-amd64.config: 13: /etc/default/grub: intel_idle.max_cstate=4: not found
dpkg: error processing package grub-efi-amd64 (--configure):
 installed grub-efi-amd64 package post-installation script subprocess returned error exit status 127
Setting up linux-image-4.15.0-51-generic (4.15.0-51.55) ...
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 configured yet.
  Package grub-pc is not installed.

dpkg: error processing package grub-efi-amd64-signed (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Setting up friendly-recovery (0.2.38ubuntu1) ...
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 13: /etc/default/grub: intel_idle.max_cstate=4: not found
dpkg: error processing package friendly-recovery (--configure):
 installed friendly-recovery package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of shim-signed:
 shim-signed depends on grub-efi-amd64-signed; however:
  Package grub-efi-amd64-signed is not configured yet.

dpkg: error processing package shim-signed (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Processing triggers for linux-image-4.15.0-51-generic (4.15.0-51.55) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.15.0-51-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 13: /etc/default/grub: intel_idle.max_cstate=4: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-4.15.0-51-generic (--configure):
 installed linux-image-4.15.0-51-generic package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 grub-efi-amd64
 grub-efi-amd64-signed
 friendly-recovery
 shim-signed
 linux-image-4.15.0-51-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_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="button.lid_init_state=open"
GRUB_CMDLINE_LINUX=""
intel_idle.max_cstate=4

# 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"

1
задан 7 June 2019 в 22:38

1 ответ

Похоже, что в вашем файле конфигурации /etc/default/grub есть ошибка, в этой части ниже (второй абзац):

GRUB_CMDLINE_LINUX_DEFAULT="button.lid_init_state=open"
GRUB_CMDLINE_LINUX=""
intel_idle.max_cstate=4

Строка intel_idle.max_cstate=4 должна быть частью присвоения переменной GRUB_CMDLINE_LINUX_DEFAULT в кавычках после = на этой строке. Поскольку вы написали его в отдельной строке, он вместо этого интерпретируется как команда оболочки.

Исправьте файл так, чтобы приведенный выше фрагмент кода выглядел следующим образом:

GRUB_CMDLINE_LINUX_DEFAULT="button.lid_init_state=open intel_idle.max_cstate=4"
GRUB_CMDLINE_LINUX=""

Сохраните изменения и затем запустите sudo update-grub.

После этого возобновите настройку оставшихся пакетов с помощью sudo dpkg --configure -a.

2
ответ дан 7 June 2019 в 22:38

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

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