更新问题... 错误 错误

更新问题... 错误 错误

我尝试了所有方法,例如手动删除 24 内核,但无论我做什么,我的输出都是这样的sudo apt-get upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-4.4.0-24-generic linux-image-extra-4.4.0-24-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
**7 not fully installed or removed.**
After this operation, 217 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 292291 files and directories currently installed.)
Removing linux-image-extra-4.4.0-24-generic (4.4.0-24.43) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-24-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-24-generic
depmod: WARNING: could not open /var/tmp/mkinitramfs_Zm20Mv/lib/modules/4.4.0-24-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_Zm20Mv/lib/modules/4.4.0-24-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
Generating grub configuration file ...
/usr/sbin/grub-probe: error: failed to get canonical path of `/boot/grub/unicode.pf2GRUB_GFXPAYLOAD_LINUX=None'.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 64
dpkg: error processing package linux-image-extra-4.4.0-24-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-24-generic (4.4.0-24.43) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-24-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
Generating grub configuration file ...
/usr/sbin/grub-probe: error: failed to get canonical path of `/boot/grub/unicode.pf2GRUB_GFXPAYLOAD_LINUX=None'.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-24-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-24-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-4.4.0-24-generic
 linux-image-4.4.0-24-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

这是我的/etc/default/grub.cfg

# 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="splash quiet"
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"

export GRUB_COLOR_NORMAL="light-green/black"
export GRUB_COLOR_HIGHLIGHT="magenta/black"
GRUB_FONT="/boot/grub/unicode.pf2"GRUB_GFXPAYLOAD_LINUX=None
GRUB_GFXPAYLOAD_LINUX=None

答案1

有两个条目第 38 行/etc/default/grub.cfg最终合并为一个变量:

GRUB_FONT="/boot/grub/unicode.pf2"GRUB_GFXPAYLOAD_LINUX=None

您需要在 之前的第二个引号 ( ")后添加换行符GRUB_GFXPAYLOAD_LINUX,或者,由于生成的条目将与第 39 行完全重复,因此您可以直接删除该部分。

答案2

它显示“7 未完全安装或删除”。sudo apt -f install应该可以解决问题。

答案3

尝试这些命令我希望它们可能有用

sudo apt-get 更新

sudo apt-get 自动清理

sudo apt-get clean

sudo apt-get 自动删除

//以防万一你知道包裹

sudo dpkg --remove -force --force-remove-reinstreq package name

相关内容