我尝试执行“sudo apt-get install mercurial”,这是我收到的错误。
内核版本:4.8.0-34-generic
The following packages were automatically installed and are no longer required: linux-headers-4.8.0-39 linux-image-generic thermald Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libjs-excanvas mercurial-common Suggested packages: qct kdiff3 | kdiff3-qt | kompare | meld | tkcvs | mgdiff python-mysqldb python-pygments python-openssl The following NEW packages will be installed: libjs-excanvas mercurial mercurial-common 0 upgraded, 3 newly installed, 0 to remove and 175 not upgraded. 5 not fully installed or removed. Need to get 0 B/2,004 kB of archives. After this operation, 10.6 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Selecting previously unselected package libjs-excanvas. (Reading database ... 208219 files and directories currently installed.) Preparing to unpack .../0-libjs-excanvas_0.r3-4_all.deb ... Unpacking libjs-excanvas (0.r3-4) ... Selecting previously unselected package mercurial-common. Preparing to unpack .../1-mercurial-common_3.9.1-1_all.deb ... Unpacking mercurial-common (3.9.1-1) ... Selecting previously unselected package mercurial. Preparing to unpack .../2-mercurial_3.9.1-1_amd64.deb ... Unpacking mercurial (3.9.1-1) ... Setting up libjs-excanvas (0.r3-4) ... Setting up linux-image-4.8.0-22-generic (4.8.0-22.24) ... Running depmod. update-initramfs: deferring update (hook will be called later) Not updating initrd symbolic links since we are being updated/reinstalled (4.8.0-22.24 was configured last, according to dpkg) Not updating image symbolic links since we are being updated/reinstalled (4.8.0-22.24 was configured last, according to dpkg) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-22-generic /boot/vmlinuz-4.8.0-22-generic run-parts: executing /etc/kernel/postinst.d/dkms 4.8.0-22-generic /boot/vmlinuz-4.8.0-22-generic dkms: WARNING: Linux headers are missing, which may explain the above failures.
please install the linux-headers-4.8.0-22-generic package to fix this. run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.8.0-22-generic /boot/vmlinuz-4.8.0-22-generic update-initramfs: Generating /boot/initrd.img-4.8.0-22-generic W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915 W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915 run-parts: executing /etc/kernel/postinst.d/pm-utils
4.8.0-22-generic /boot/vmlinuz-4.8.0-22-generic run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.8.0-22-generic /boot/vmlinuz-4.8.0-22-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 4.8.0-22-generic /boot/vmlinuz-4.8.0-22-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.8.0-22-generic /boot/vmlinuz-4.8.0-22-generic /usr/sbin/grub-mkconfig: 1: /etc/default/grub: If: not found run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.8.0-22-generic.postinst line 1052. dpkg: error processing package linux-image-4.8.0-22-generic (--configure): subprocess installed post-installation script returned error exit status 2 Setting up mercurial-common (3.9.1-1) ... Setting up mercurial (3.9.1-1) ...
Creating config file /etc/mercurial/hgrc.d/hgext.rc with new version Setting up linux-image-4.8.0-39-generic (4.8.0-39.42) ... Running depmod. update-initramfs: deferring update (hook will be called later) initrd.img(/boot/initrd.img-4.8.0-39-generic ) points to /boot/initrd.img-4.8.0-39-generic (/boot/initrd.img-4.8.0-39-generic)
-- doing nothing at /var/lib/dpkg/info/linux-image-4.8.0-39-generic.postinst line 491. vmlinuz(/boot/vmlinuz-4.8.0-39-generic ) points to /boot/vmlinuz-4.8.0-39-generic (/boot/vmlinuz-4.8.0-39-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.8.0-39-generic.postinst line 491. Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic run-parts: executing /etc/kernel/postinst.d/dkms 4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic dkms: WARNING: Linux headers are missing, which may explain the above failures.
please install the linux-headers-4.8.0-39-generic package to fix this. run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic update-initramfs: Generating /boot/initrd.img-4.8.0-39-generic run-parts: executing /etc/kernel/postinst.d/pm-utils 4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.8.0-39-generic /boot/vmlinuz-4.8.0-39-generic /usr/sbin/grub-mkconfig: 1: /etc/default/grub: If: not found run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.8.0-39-generic.postinst line 1052. dpkg: error processing package linux-image-4.8.0-39-generic (--configure): subprocess installed post-installation script returned error exit status 2 Processing triggers for man-db (2.7.5-1) ... dpkg: dependency problems prevent configuration of linux-image-generic: linux-image-generic depends on linux-image-4.8.0-39-generic; however: Package linux-image-4.8.0-39-generic is not configured yet.
dpkg: error processing package linux-image-generic (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of linux-image-extra-4.8.0-39-generic: linux-image-extra-4.8.0-39-generic depends on linux-image-4.8.0-39-generic; however: Package linux-image-4.8.0-39-generic is not configured yet.
dpkg: error processing package linux-image-extra-4.8.0-39-generic (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of linux-image-extra-4.8.0-22-generic: linux-image-extra-4.8.0-22-generic depends on linux-image-4.8.0-22-generic; however: Package linux-image-4.8.0-22-generic is not configured yet.
dpkg: error processing package linux-image-extra-4.8.0-22-generic (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: linux-image-4.8.0-22-generic linux-image-4.8.0-39-generic linux-image-generic linux-image-extra-4.8.0-39-generic linux-image-extra-4.8.0-22-generic E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试安装所有标头,但没有任何变化。我该如何修复此问题?