我的系统:

我的系统:

我正在尝试linux-image-extra-*按照说明安装软件包(这是 Docker 的先决条件)这里

sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

但我收到以下错误信息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-image-extra-3.19.0-32-generic is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-image-extra-virtual : Depends: linux-image-generic (= 3.13.0.107.115) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试使用以下命令修复所有损坏的依赖项:

sudo apt-get -f install

结果如下:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 152 not to upgrade.

然后运行命令安装 linux-image-extra-* 内核包,但仍然出现相同的错误。

我尝试sudo apt-get update按照命令安装 linux-image-extra-* 内核包,但结果仍然一样。

这可能是什么问题?我该如何解决?

我的系统:

Ubuntu 14.04

的输出uname -r为:

3.19.0-32-generic

的输出dpkg --list | egrep -i --color 'linux-image|linux-headers'

ii  linux-headers-3.19.0-32                     3.19.0-32.37~14.04.1                                all          Header files related to Linux kernel version 3.19.0
ii  linux-headers-3.19.0-32-generic             3.19.0-32.37~14.04.1                                amd64        Linux kernel headers for version 3.19.0 on 64 bit x86 SMP
ii  linux-image-3.19.0-32-generic               3.19.0-32.37~14.04.1                                amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
ii  linux-image-extra-3.19.0-32-generic         3.19.0-32.37~14.04.1                                amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP

类似但实际上不相关的帖子

  • 这个有类似的错误,但问题是启动分区中的项目太多,但对我来说似乎不是这种情况。

潜在的解决方案?

  • 我偶然发现了这个帖子这可能值得一试?它涉及从文件中删除与相关包相关的任何代码行dpkg status。但我担心从这个文件中删除内核映像信息可能会损坏我的电脑。

答案1

除了使用--fix-broken/-f命令来满足依赖关系之外,您还可以尝试下载并安装提到的依赖关系(linux-image-generic=3.13.0.107.115):

32 位:下载链接

64 位:下载链接

要安装该.deb文件,我建议您使用gdebi 软件包安装程序它还检查包依赖关系并判断其是否满足:

sudo apt install gdebi
sudo gdebi Downloads/linux-image-generic_3.13.0.107.115_arch.deb

代替使用 i386 (32 位) 或 amd64 (64 位)。

答案2

可能出了点问题。你的内核是3.19.0-32-generic基于uname -r输出的。但是在这个关联3.13.0.107.115。这意味着你的内核领先于trusty存储库源。

因此,您可能需要检查存储库列表,/etc/apt/sources.list或者您已3.19.0-32 kernel手动安装。

选项1

请尝试以下命令。

sudo apt install linux-image-generic-lts-vivid linux-image-extra-virtual-lts-vivid 

这可能会将您的内核更新至3.19.0.79

选项 2

您可以尝试将内核回滚到3.13.0.107。但这可能需要小心。这是有风险的。如果您同意,您可以参考此回答.然后再次安装

sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

答案3

请尝试以下命令。

kern_extras="linux-image-extra-virtual linux-image-extra-$(uname -r)"

相关内容