在 ubuntu 16.04 上安装 linux 内核时出错;dpkg:处理包 linux-tools 时出错

在 ubuntu 16.04 上安装 linux 内核时出错;dpkg:处理包 linux-tools 时出错

我正在关注本教程在我的 ubuntu 系统中编译并安装新内核时出现此错误

dpkg: error processing package linux-tools-4.4.0-119-generic (--install)

当我发出sudo dpkg -i linux*4.4.0-119.143*.deb

这是完整的输出:

(Reading database ... 270468 files and directories currently installed.)
Preparing to unpack linux-cloud-tools-4.4.0-119_4.4.0-119.143+test1_amd64.deb ...
Unpacking linux-cloud-tools-4.4.0-119 (4.4.0-119.143+test1) over (4.4.0-119.143+test1) ...
Preparing to unpack linux-cloud-tools-4.4.0-119-generic_4.4.0-119.143+test1_amd64.deb ...
Unpacking linux-cloud-tools-4.4.0-119-generic (4.4.0-119.143+test1) over (4.4.0-119.143+test1) ...
Preparing to unpack linux-headers-4.4.0-119_4.4.0-119.143+test1_all.deb ...
Unpacking linux-headers-4.4.0-119 (4.4.0-119.143+test1) over (4.4.0-119.143+test1) ...
Preparing to unpack linux-headers-4.4.0-119-generic_4.4.0-119.143+test1_amd64.deb ...
Unpacking linux-headers-4.4.0-119-generic (4.4.0-119.143+test1) over (4.4.0-119.143+test1) ...
Preparing to unpack linux-image-4.4.0-119-generic_4.4.0-119.143+test1_amd64.deb ...
Done.
Unpacking linux-image-4.4.0-119-generic (4.4.0-119.143+test1) over (4.4.0-119.143+test1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
Preparing to unpack linux-image-extra-4.4.0-119-generic_4.4.0-119.143+test1_amd64.deb ...
Unpacking linux-image-extra-4.4.0-119-generic (4.4.0-119.143+test1) over (4.4.0-119.143+test1) ...
Preparing to unpack linux-tools-4.4.0-119_4.4.0-119.143+test1_amd64.deb ...
Unpacking linux-tools-4.4.0-119 (4.4.0-119.143+test1) over (4.4.0-119.143+test1) ...
Preparing to unpack linux-tools-4.4.0-119-generic_4.4.0-119.143+test1_amd64.deb ...
Unpacking linux-tools-4.4.0-119-generic (4.4.0-119.143+test1) over (4.4.0-119.143+test1) ...
dpkg: dependency problems prevent configuration of linux-cloud-tools-4.4.0-119:
 linux-cloud-tools-4.4.0-119 depends on linux-cloud-tools-common; however:
  Package linux-cloud-tools-common is not installed.

dpkg: error processing package linux-cloud-tools-4.4.0-119 (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-cloud-tools-4.4.0-119-generic:
 linux-cloud-tools-4.4.0-119-generic depends on linux-cloud-tools-4.4.0-119; however:
  Package linux-cloud-tools-4.4.0-119 is not configured yet.

dpkg: error processing package linux-cloud-tools-4.4.0-119-generic (--install):
 dependency problems - leaving unconfigured
Setting up linux-headers-4.4.0-119 (4.4.0-119.143+test1) ...
Setting up linux-headers-4.4.0-119-generic (4.4.0-119.143+test1) ...
Setting up linux-image-4.4.0-119-generic (4.4.0-119.143+test1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Not updating initrd symbolic links since we are being updated/reinstalled 
(4.4.0-119.143+test1 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled 
(4.4.0-119.143+test1 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/vboxadd 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.13.0-38-generic
Found initrd image: /boot/initrd.img-4.13.0-38-generic
Found linux image: /boot/vmlinuz-4.13.0-36-generic
Found initrd image: /boot/initrd.img-4.13.0-36-generic
Found linux image: /boot/vmlinuz-4.4.0-119-generic
Found initrd image: /boot/initrd.img-4.4.0-119-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Setting up linux-image-extra-4.4.0-119-generic (4.4.0-119.143+test1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
run-parts: executing /etc/kernel/postinst.d/vboxadd 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-119-generic /boot/vmlinuz-4.4.0-119-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.13.0-38-generic
Found initrd image: /boot/initrd.img-4.13.0-38-generic
Found linux image: /boot/vmlinuz-4.13.0-36-generic
Found initrd image: /boot/initrd.img-4.13.0-36-generic
Found linux image: /boot/vmlinuz-4.4.0-119-generic
Found initrd image: /boot/initrd.img-4.4.0-119-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
dpkg: dependency problems prevent configuration of linux-tools-4.4.0-119:
 linux-tools-4.4.0-119 depends on linux-tools-common; however:
  Package linux-tools-common is not installed.

dpkg: error processing package linux-tools-4.4.0-119 (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-tools-4.4.0-119-generic:
 linux-tools-4.4.0-119-generic depends on linux-tools-4.4.0-119; however:
  Package linux-tools-4.4.0-119 is not configured yet.

dpkg: error processing package linux-tools-4.4.0-119-generic (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-cloud-tools-4.4.0-119
 linux-cloud-tools-4.4.0-119-generic
 linux-tools-4.4.0-119
 linux-tools-4.4.0-119-generic

我的 ubuntu 是 16.04,64 位,在 virtualbox 中运行。主机是运行 ubuntu 14.04 的 dell latitude。编译顺利,没有错误。欢迎任何帮助。

答案1

它已经在错误输出中了。由于未安装 linux-tools-common,存在一些依赖关系问题。所以

sudo apt-get install linux-tools-common

你可以先尝试一下,

sudo apt-get install -f

相关内容