输出自apt-get
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
aptitude-common libboost-iostreams1.53.0 libcwidget3 libept1.4.12
Suggested packages:
aptitude-doc-en aptitude-doc tasksel debtags libcwidget-dev
The following packages will be REMOVED:
linux-image-3.11.0-15-generic linux-image-extra-3.11.0-15-generic
The following NEW packages will be installed:
aptitude aptitude-common libboost-iostreams1.53.0 libcwidget3 libept1.4.12
0 upgraded, 5 newly installed, 2 to remove and 4 not upgraded.
3 not fully installed or removed.
Need to get 2,647 kB of archives.
After this operation, 174 MB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://in.archive.ubuntu.com/ubuntu/ saucy/main libboost-iostreams1.53.0 amd64 1.53.0-6+exp3ubuntu8 [34.6 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu/ saucy/main aptitude-common all 0.6.8.2-1ubuntu2 [700 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu/ saucy/main libcwidget3 amd64 0.5.16-3.4ubuntu2 [401 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu/ saucy/main libept1.4.12 amd64 1.0.9 [135 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu/ saucy/main aptitude amd64 0.6.8.2-1ubuntu2 [1,377 kB]
Fetched 2,647 kB in 16s (164 kB/s)
(Reading database ... 205837 files and directories currently installed.)
Removing linux-image-extra-3.11.0-15-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-15-generic /boot/vmlinuz-3.11.0-15-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-15-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-15-generic /boot/vmlinuz-3.11.0-15-generic
/usr/sbin/grub-mkconfig: 13: /etc/default/grub: back: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.11.0-15-generic.postrm line 328.
dpkg: error processing linux-image-extra-3.11.0-15-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.11.0-15-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-15-generic /boot/vmlinuz-3.11.0-15-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-15-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-15-generic /boot/vmlinuz-3.11.0-15-generic
/usr/sbin/grub-mkconfig: 13: /etc/default/grub: back: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.11.0-15-generic.postrm line 328.
dpkg: error processing linux-image-3.11.0-15-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-3.11.0-15-generic
linux-image-3.11.0-15-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
编辑:
输出自sudo 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="quiet splash acpi_backlight=vendor"
GRUB_CMDLINE_LINUX=""
back
# 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
在终端中运行此命令:
sudo -H gedit /etc/default/grub
然后,删除第 13 行。删除以下行:
back
然后运行此命令:
sudo dpkg --configure -a
然后,重试您之前执行的 apt-get 命令。