ubuntu16.04虚拟win7——经验笔记——问题:Kernel driver not installed (rc=1908) error.

ubuntu16.04虚拟win7——经验笔记——问题:Kernel driver not installed (rc=1908) error. The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. executing  '/sbin/vboxconfig'  as root.

解决过程

1.刚刚在ubuntu software更新了系统,一重启,要打开虚拟机的时候出现如下

ubuntu16.04虚拟win7——经验笔记——问题:Kernel driver not installed (rc=1908) error._第1张图片

2.如何解决

于是照着报错的提示解决:

sudo /sbin/vboxconfig

出现:

[sudo] password for wangshuai: 
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.                                              

于是

wangshuai@wangshuai-Vostro:~$ head /var/log/vbox-install.log 
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/4.10.0-32-generic/build -j8 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (	\
echo >&2;							\
echo >&2 "  ERROR: Kernel configuration is invalid.";		\
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
echo >&2 ;							\
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
...
...
...略 

于是

wangshuai@wangshuai-Vostro:~$ uname -a
Linux wangshuai-Vostro 4.15.0-24-generic #26~16.04.1-Ubuntu SMP Fri Jun 15 14:35:08 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
wangshuai@wangshuai-Vostro:~$ cd /usr/src/linux-headers-4.15.0-24-generic/
wangshuai@wangshuai-Vostro:/usr/src/linux-headers-4.15.0-24-generic$ ls
arch   certs   Documentation  firmware  include  ipc     Kconfig  lib       mm              net      scripts   sound  tools   usr   zfs
block  crypto  drivers        fs        init     Kbuild  kernel   Makefile  Module.symvers  samples  security  spl    ubuntu  virt
wangshuai@wangshuai-Vostro:/usr/src/linux-headers-4.15.0-24-generic$ make oldconfig && make prepare
scripts/kconfig/conf  --oldconfig Kconfig
security/Kconfig:393:warning: defaults for choice values not supported
security/Kconfig:397:warning: defaults for choice values not supported
security/Kconfig:401:warning: defaults for choice values not supported
security/Kconfig:405:warning: defaults for choice values not supported
security/Kconfig:409:warning: defaults for choice values not supported

*** Error during writing of the configuration.

scripts/kconfig/Makefile:87: recipe for target 'oldconfig' failed
make[1]: *** [oldconfig] Error 1
Makefile:537: recipe for target 'oldconfig' failed
make: *** [oldconfig] Error 2

看来也没啥用

于是疯狂google

发现一个网址https://forums.virtualbox.org/viewtopic.php?t=82633,还是vbox官网的FAQ比较有用。

后面的回复的意思是说linux的kernel更新了的话一些application也得更新下,uname -a 发现我的linux内核是linux-headers-4.15.0-24-generic/,我的virtualbox版本是5.1.26

wangshuai@wangshuai-Vostro:/usr/src$ sudo apt-get install virtualbox-5.1
[sudo] password for wangshuai: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
virtualbox-5.1 is already the newest version (5.1.26-117224~Ubuntu~xenial).
The following packages were automatically installed and are no longer required:
  libllvm4.0 linux-headers-4.13.0-43 linux-headers-4.13.0-43-generic linux-image-4.13.0-43-generic linux-image-extra-4.13.0-43-generic
  linux-signed-image-4.13.0-43-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

ubuntu16.04虚拟win7——经验笔记——问题:Kernel driver not installed (rc=1908) error._第2张图片

根据另一个网址https://www.virtualbox.org/wiki/Changelog-5.1,得到上图及下面一些图,这图说5.1.24的vbox与内核为4.12或4.13兼容(不确定),而且

ubuntu16.04虚拟win7——经验笔记——问题:Kernel driver not installed (rc=1908) error._第3张图片

貌似内核4.15支持vbox5.1.34,所以我决定把vbox升级一下试试,利用synaptic package manager把vbox5.1.26移除然后装上vbox5.1.34及相关的guest addition和 package。装完之后启动vbox就成功打开vbox了。




你可能感兴趣的:(经验笔记)