内核安装一半,无法安装/卸载任何东西

内核安装一半,无法安装/卸载任何东西

嗯,我遇到了这个问题,我不知道是怎么遇到的,但我需要一些帮助。

首先,我的电脑运行的是 Ubuntu 14.04.3 LTS 版本,当前内核(我从 获得的内核uname -r)是 3.13.0-63-generic。如果您还需要了解其他信息,请告诉我。

我的问题如下:每次我尝试使用 apt-get 或 Synaptic 安装/卸载某些软件包时,都会收到有关这些软件包的错误:

  • Linux-映像-3.13.0-65-通用
  • Linux-image-3.13.0-65-低延迟
  • Linux-image-extra-3.13.0-65-通用

我得到的输出(例如,当我运行时sudo apt-get install 'package-name')是:

Setting up linux-image-3.13.0-65-generic (3.13.0-65.106) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-3.13.0-65-generic
) points to /boot/initrd.img-3.13.0-65-generic
 (/boot/initrd.img-3.13.0-65-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-65-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-3.13.0-65-generic
) points to /boot/vmlinuz-3.13.0-65-generic
 (/boot/vmlinuz-3.13.0-65-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-65-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
/usr/sbin/grub-mkconfig: 37: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-65-generic.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-65-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-3.13.0-65-lowlatency (3.13.0-65.106) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
update-initramfs: Generating /boot/initrd.img-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
/usr/sbin/grub-mkconfig: 37: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-65-lowlatency.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-65-lowlatency (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-65-generic:
 linux-image-extra-3.13.0-65-generic depends on linux-image-3.13.0-65-generic; however:
  Package linux-image-3.13.0-65-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.13.0-65-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 linux-image-3.13.0-65-generic
 linux-image-3.13.0-65-lowlatency
 linux-image-extra-3.13.0-65-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试过一些在线解决方案,但到目前为止,没有一个能解决我的问题。其中一些(以及相应的输出)如下:

输入:sudo apt-get -f install

输出:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-3.13.0-65-generic (3.13.0-65.106) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
/usr/sbin/grub-mkconfig: 37: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-65-generic.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-65-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-3.13.0-65-lowlatency (3.13.0-65.106) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
update-initramfs: Generating /boot/initrd.img-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
/usr/sbin/grub-mkconfig: 37: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-65-lowlatency.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-65-lowlatency (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-65-generic:
 linux-image-extra-3.13.0-65-generic depends on linux-image-3.13.0-65-generic; however:
  Package linux-image-3.13.0-65-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.13.0-65-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 linux-image-3.13.0-65-generic
 linux-image-3.13.0-65-lowlatency
 linux-image-extra-3.13.0-65-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

输入:sudo dpkg --configure -a

输出:

Setting up linux-image-3.13.0-65-lowlatency (3.13.0-65.106) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-3.13.0-65-lowlatency
) points to /boot/initrd.img-3.13.0-65-lowlatency
 (/boot/initrd.img-3.13.0-65-lowlatency) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-65-lowlatency.postinst line 491.
vmlinuz(/boot/vmlinuz-3.13.0-65-lowlatency
) points to /boot/vmlinuz-3.13.0-65-lowlatency
 (/boot/vmlinuz-3.13.0-65-lowlatency) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-65-lowlatency.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
update-initramfs: Generating /boot/initrd.img-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-65-lowlatency /boot/vmlinuz-3.13.0-65-lowlatency
/usr/sbin/grub-mkconfig: 37: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-65-lowlatency.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-65-lowlatency (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-3.13.0-65-generic (3.13.0-65.106) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
/usr/sbin/grub-mkconfig: 37: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-65-generic.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-65-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-65-generic:
 linux-image-extra-3.13.0-65-generic depends on linux-image-3.13.0-65-generic; however:
  Package linux-image-3.13.0-65-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.13.0-65-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.13.0-65-lowlatency
 linux-image-3.13.0-65-generic
 linux-image-extra-3.13.0-65-generic

如果您需要任何其他信息,我很乐意提供给您。

如果有人能帮助我,那对我来说意义重大。我真的需要能够在我的计算机上安装/卸载软件包,所以我需要尽快解决这个问题。

附言:请记住,我不是 Ubuntu/Linux 专家。

编辑:

这是 /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="Windows Boot UEFI loader"
#GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="60"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT=""quiet splash intel_pstate=disable i915.lvds_downclock=1 drm.vblankoffdelay=1 i915.semaphores=1 i915_enable_rc6=1 i915_enable_fbc=1"
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_SAVEDEFAULT="false"

答案1

错误消息中的这一行

/usr/sbin/grub-mkconfig: 37: /etc/default/grub: Syntax error: EOF in backquote substitution

说,第 37 行有错误,但实际上并没有第 37 行。因此,最可能的解释是引用有误。现在来看看你的问题中的这一行:

GRUB_CMDLINE_LINUX_DEFAULT=“”安静的启动intel_pstate =禁用i915.lvds_downclock = 1 drm.vblankoffdelay = 1 i915.semaphores = 1 i915_enable_rc6 = 1 i915_enable_fbc = 1

此行中有三个双引号。删除一个双引号:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable i915.lvds_downclock=1 drm.vblankoffdelay=1 i915.semaphores=1 i915_enable_rc6=1 i915_enable_fbc=1"

别忘了

sudo update-grub

编辑文件后。

答案2

您的 中有错误/etc/default/grub

线路

GRUB_CMDLINE_LINUX_DEFAULT=""quiet splash intel_pstate=disable i915.lvds_downclock=1 drm.vblankoffdelay=1 i915.semaphores=1 i915_enable_rc6=1 i915_enable_fbc=1"

必须

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable i915.lvds_downclock=1 drm.vblankoffdelay=1 i915.semaphores=1 i915_enable_rc6=1 i915_enable_fbc=1"

因为第一个会产生语义错误。

相关内容