Virtualbox找不到合适的模块来运行内核


9

我使用远程计算机ubuntu 12.04(仅控制台)

发行者ID:Ubuntu说明:Ubuntu 12.04.4 LTS

我有一些奇怪的内核uname -a Linux 2.6.38.2-grsec-xxxx-grs-ipv6-64#1 SMP Fri Apr 15 17:44:15 UTC 2011 x86_64 x86_64 x86_64 GNU / Linux

-也许beeter正在切换到其他内核?怎么做 ?

(我尝试在此服务器上安装虚拟机)

apt-get install virtualbox

Konfigurowanie virtualbox (4.1.12-dfsg-2ubuntu0.5) ...
 * Stopping VirtualBox kernel modules                                                                             Opening /proc/modules: No such file or directory
Opening /proc/modules: No such file or directory
Opening /proc/modules: No such file or directory
Opening /proc/modules: No such file or directory
                                                                                                           [ OK ]
 * Starting VirtualBox kernel modules                                                                             Opening /proc/modules: No such file or directory
 * No suitable module for running kernel found
                                                                                                           [fail]


Loading new virtualbox-4.1.12 DKMS files...                                                                       
First Installation: checking all kernels...                                                                        
dpkg: ostrzeżenie: wersja "*-*" ma złą składnię: version number does not start with digit                          
It is likely that 2.6.38.2-grsec-xxxx-grs-ipv6-64 belongs to a chroot's host                                       
Building initial module for 2.6.38-10-generic                                                                       
Done.

vboxdrv:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-10-generic/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-10-generic/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-10-generic/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-10-generic/updates/dkms/

depmod....

DKMS: install completed.
Building initial module for 2.6.38-11-generic
Done.

vboxdrv:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-11-generic/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-11-generic/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-11-generic/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-11-generic/updates/dkms/

depmod....

DKMS: install completed.
Building initial module for 2.6.38-14-generic
Done.

vboxdrv:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-14-generic/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-14-generic/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-14-generic/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-14-generic/updates/dkms/

depmod....

DKMS: install completed.
Building initial module for 2.6.38-8-generic
Done.

vboxdrv:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-8-generic/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-8-generic/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-8-generic/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.38-8-generic/updates/dkms/

depmod....

DKMS: install completed.
Building initial module for 3.2.0-60-generic

Done.

vboxdrv:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.2.0-60-generic/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.2.0-60-generic/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.2.0-60-generic/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.2.0-60-generic/updates/dkms/

depmod....

DKMS: install completed.
 * Stopping VirtualBox kernel modules                                                                             Opening /proc/modules: No such file or directory
Opening /proc/modules: No such file or directory
Opening /proc/modules: No such file or directory
Opening /proc/modules: No such file or directory
                                                                                                           [ OK ]
 * Starting VirtualBox kernel modules                                                                             Opening /proc/modules: No such file or directory
 * No suitable module for running kernel found
                                                                                                           [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
Konfigurowanie virtualbox-qt (4.1.12-dfsg-2ubuntu0.5) ...

我发现一些信息,我必须安装内核标题,但是

sudo apt-get install linux-headers-$(uname -r) 
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności       
Odczyt informacji o stanie... Gotowe
E: Nie udało się odnaleźć pakietu linux-headers-2.6.38.2-grsec-xxxx-grs-ipv6-64

(未找到)

我找到了安装内核头文件的信息,但:

sudo apt-get install linux-headers-$(uname -r) 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-2.6.38.2-grsec-xxxx-grs-ipv6-64
E: Couldn't find any package by regex 'linux-headers-2.6.38.2-grsec-xxxx-grs-ipv6-64'

我能做什么 ?

Answers:


9

升级linux-image程序包后出现相同错误。为了构建模块,您需要virtualbox-sourcevirtualbox-dkms打包。我以virtualbox-dkms包裹结束。

所以我安装缺少linux-headers-amd64

$ sudo apt-get install linux-headers-amd64

并重建virtualbox.ko

$ sudo dpkg-reconfigure --priority low virtualbox-dkms 

并加载模块:

$ sudo service virtualbox start

终于VirtualBox能够运行来宾了!


9

此外,apt-get install virtualbox您还必须运行(以root用户身份) apt-get install virtualbox-source module-assistant m-a prepare m-a a-i virtualbox-source 然后/etc/init.d/virtualbox start才能工作。

从各种Google搜索中搜集而成,并为我开发了Linux Mint 17(Ubuntu 14.04)


2
尽管我在使用模块辅助之后而不是之前安装了virtualbox软件包,但是这对我来说效果很好。另外,如果您使用的是桌面环境,例如Linux Mint上的Cinnamon,则还必须运行apt-get install virtualbox-qt以使VirtualBox GUI可用(并非真的适用于此问题,但希望对发现此问题的其他人有所帮助)。
乔·班恩

太好了!花了几个小时试图找出答案,很高兴我终于找到了你的答案!
BiAiB 2015年

1

以上都不对我有用。我实际上也没有在网上找到任何东西...

TL; DR

如果你们中的任何一个有相同的问题,这就是我解决的方法:

# cleanup old stuff    
apt-get autoremove --purge virtualbox virtualbox-dkms virtualbox-qt

# install 
echo "deb http://http.debian.net/debian/ wheezy-backports main contrib" > /etc/apt/sources.list.d/backports.list
apt-get update
apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
apt-get -t wheezy-backports install virtualbox

笔记

安装结束后,即使在此过程中收到错误消息,我仍具有有效的virtualbox设置 =>[FAIL] Starting VirtualBox kernel modules[....] No suitable module for running kernel found ... failed!

所以不要担心,只要您稍后接听电话DKMS: install completed.并能够运行vboxmanage --version

眼镜

我的linux服务器是由

Distributor ID: Debian
Description:    Debian GNU/Linux 7.8 (wheezy)
Release:        7
Codename:       wheezy
Kernel:         3.16.0-0.bpo.4-amd64

以上都不对我有用。实际上,我的回答涵盖了您忽略非必要细节的写作。您只是无法烘烤))添加wheezy-backports是一个模糊的步骤,除非您想使用最新的软件包版本。
Givenkoa '16

@gavenkoa您没有清除,没有使用wheezy-backport,也没有重新安装整个软件包。您需要重新配置并重新加载模块。所以不,那不一样!您的方式是准确的,Mine更全球化。也许您描述的所有内容都涵盖了我所做的一切,但反之则不然。无论如何,我只想分享我为使它工作所做的实际工作,因为你们的工作对我不利。我看不出您的观点声称它与明显不同是相同的,甚至是您甚至无法测试的东西。
frntn

认真思考!您是否建议重新安装操作系统或切换发行版以解决问题?不能。问题的根源在于缺少为旧内核构建的内核模块vbox内核模块。因此,有两种解决方案- 安装缺少的模块将模块重新链接到更新的内核API。我认为您错过了答案的最后一点。无论如何,我通常也都使用全部重装方法,因为了解世界上的生命很短暂。
Givenkoa '16
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.