无法重新配置 virtualbox-dkms

Mah*_*hdi 8 debian kernel-modules software-installation linux-kernel dkms

我已经根据debian wiki上的说明在 Debian Jessie 上安装了 vitualbox 。
通过运行:

apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') virtualbox
Run Code Online (Sandbox Code Playgroud)

在安装过程中报告了一些错误。
现在我想重新配置 virtualbox-dkms 但我收到此错误:

Loading new virtualbox-4.3.18 DKMS files...
Building only for 3.16-3-amd64
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
Run Code Online (Sandbox Code Playgroud)

注意:uname -r显示3.16-3-amd64但我在 /usr/src 中的源文件夹被命名为:
linux-headers-3.16.0-4-amd64.

我不知道该怎么办!

gar*_*Red 13

跑:

$ sudo apt-get update
$ sudo apt-get install linux-headers-`uname -r`
Run Code Online (Sandbox Code Playgroud)

如果第二个命令仍然找不到任何东西,那么:

$ apt-cache search linux-headers-
Run Code Online (Sandbox Code Playgroud)

列出所有linux-headers可用的包。

至少有一个应该与您正在运行的内核相匹配(如 所示uname -r)。

然后:

sudo apt-get install linux-headers-<version number>
Run Code Online (Sandbox Code Playgroud)


Mah*_*hdi 3

我做了所有这些解决方案,但问题出在我的内核上!

linux-headers-uname -r由于我的内核版本而想要安装 3.16.0-3 标头,但 Debian 存储库中没有这样的 linux 内核标头:有3.16.0-4

解决方案:通过 apt-get 升级我的内核,然后一切正常。