安装virtual box失败,无法启动虚拟机
Tofloor
poster avatar
q77190858
deepin
2020-07-19 05:20
Author
本帖最后由 q77190858 于 2020-7-26 03:07 编辑

我安装的是源里面的virtualbox-6.1
  1. sudo apt install virtualbox-6.1
Copy the Code
然后说安装过程中出了点问题,要我手动运行
  1. There were problems setting up VirtualBox.  To re-start the set-up process, run
  2.   /sbin/vboxconfig
  3. as root.  If your system is using EFI Secure Boot you may need to sign the
  4. kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
  5. them. Please see your Linux system's documentation for more information.
Copy the Code
然后我手动运行了/sbin/vboxconfig还是失败
  1. juju@juju-PC:~$ sudo /sbin/vboxconfig
  2. vboxdrv.sh: Stopping VirtualBox services.
  3. vboxdrv.sh: Starting VirtualBox services.
  4. vboxdrv.sh: Building VirtualBox kernel modules.
  5. vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

  6. There were problems setting up VirtualBox.  To re-start the set-up process, run
  7.   /sbin/vboxconfig
  8. as root.  If your system is using EFI Secure Boot you may need to sign the
  9. kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
  10. them. Please see your Linux system's documentation for more information.
Copy the Code
看日志编译错误,好像是编译内核模块失败了,我自己升级了内核deb,跟这个有关系吗,怎么破?
日志大概是这样的

  1. Building the main VirtualBox module.
  2.   2 Error building the module:
  3.   3 make V=1 CONFIG_MODULE_SIG= -C /lib/modules/5.6.19-050619-generic/build M=/tmp/vbox.0 SRCROOT=    /tmp/vbox.0 -j8 modules
  4.   4 make[1]: warning: -j8 forced in submake: resetting jobserver mode.
  5.   5 make -f ./scripts/Makefile.build obj=/tmp/vbox.0 \
  6.   6 single-build= \
  7.   7 need-builtin=1 need-modorder=1

  8. 。。。。。。
  9. 中间省略了很多编译输出信息

  10. In file included from ././include/linux/compiler_types.h:59,
  11. 45                  from :
  12. 46 ./include/linux/compiler_attributes.h:200:41: error: expected ‘)’ before ‘__attribute__’
  13. 47  # define fallthrough                    __attribute__((__fallthrough__))
  14. 48                                          ^~~~~~~~~~~~~
  15. 49 /tmp/vbox.0/include/iprt/cdefs.h:1169:48: note: in expansion of macro ‘fallthrough’
  16. 50  # define RT_FALL_THROUGH()      __attribute__((fallthrough))
  17. 51                                                 ^~~~~~~~~~~
  18. 52 /tmp/vbox.0/include/iprt/cdefs.h:1176:33: note: in expansion of macro ‘RT_FALL_THROUGH’
  19. 53  #define RT_FALL_THRU()          RT_FALL_THROUGH()
  20. 54                                  ^~~~~~~~~~~~~~~
  21. 55 /tmp/vbox.0/SUPDrvGip.c:4221:17: note: in expansion of macro ‘RT_FALL_THRU’
  22. 56                  RT_FALL_THRU();
  23. 57                  ^~~~~~~~~~~~
  24. 58 In file included from /tmp/vbox.0/include/VBox/cdefs.h:32,
  25. 59                  from /tmp/vbox.0/SUPDrvInternal.h:37,
  26. 60                  from /tmp/vbox.0/SUPDrvGip.c:33:
Copy the Code

还有很多的这样的类似语法错误,然后make停止了
日志附件上传了
vbox-setup.log.tar.gz

我已经关闭了安全启动,看来virtualbox是用不了了

我又换了5.4的longterm内核,试了一下还是安装失败,估计是必须要原配的内核才能安装成功吧,但是我原配的内核很多驱动用不起。。。算了吧

  1. juju@juju-PC:~/plugin-guide/build-dde-sys-monitor-plugin-unknown-Default$ sudo /sbin/vboxconfig
  2. vboxdrv.sh: Stopping VirtualBox services.
  3. depmod: WARNING: could not open modules.order at /lib/modules/5.4.52: No such file or directory
  4. depmod: WARNING: could not open modules.builtin at /lib/modules/5.4.52: No such file or directory
  5. vboxdrv.sh: Starting VirtualBox services.
  6. vboxdrv.sh: Building VirtualBox kernel modules.
  7. vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

  8. There were problems setting up VirtualBox.  To re-start the set-up process, run
  9.   /sbin/vboxconfig
  10. as root.  If your system is using EFI Secure Boot you may need to sign the
  11. kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
  12. them. Please see your Linux system's documentation for more information.
Copy the Code


然后dmesg输出的信息都是类似这样的,就贴一下前面的一部分吧
  1. juju@juju-PC:~$ sudo dmesg
  2. [  332.934099] evbug: Event. Dev: input2, Type: 1, Code: 57, Value: 0
  3. [  332.934099] evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
  4. [  333.071004] evbug: Event. Dev: input2, Type: 4, Code: 4, Value: 28
  5. [  333.071006] evbug: Event. Dev: input2, Type: 1, Code: 28, Value: 1
  6. [  333.071006] evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
  7. [  333.185214] evbug: Event. Dev: input2, Type: 4, Code: 4, Value: 28
  8. [  333.185216] evbug: Event. Dev: input2, Type: 1, Code: 28, Value: 0
  9. [  333.185216] evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
  10. [  333.386219] evbug: Event. Dev: input2, Type: 4, Code: 4, Value: 49
  11. [  333.386221] evbug: Event. Dev: input2, Type: 1, Code: 49, Value: 1
  12. [  333.386221] evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
  13. [  333.444319] evbug: Event. Dev: input2, Type: 4, Code: 4, Value: 18
  14. [  333.444320] evbug: Event. Dev: input2, Type: 1, Code: 18, Value: 1
  15. [  333.444320] evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
  16. [  333.476658] evbug: Event. Dev: input2, Type: 4, Code: 4, Value: 49
  17. [  333.476659] evbug: Event. Dev: input2, Type: 1, Code: 49, Value: 0
  18. [  333.476659] evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
  19. [  333.537436] evbug: Event. Dev: input2, Type: 4, Code: 4, Value: 49
  20. [  333.537437] evbug: Event. Dev: input2, Type: 1, Code: 49, Value: 1
  21. [  333.537437] evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
  22. [  333.605933] evbug: Event. Dev: input2, Type: 4, Code: 4, Value: 18
  23. [  333.605935] evbug: Event. Dev: input2, Type: 1, Code: 18, Value: 0
  24. [  333.605935] evbug: Event. Dev: input2, Type: 0, Code: 0, Value: 0
  25. [  333.622039] evbug: Event. Dev: input2, Type: 4, Code: 4, Value: 49
  26. [  333.622041] evbug: Event. Dev: input2, Type: 1, Code: 49, Value: 0
Copy the Code


说一下最后的解决方法,就是用vmware player,去官网下载免费的版本安装,然后自己用本机版本的gcc编译器编译了5.4.53的内核安装到电脑,运行vmware,它会提示编译安装两个模块到内核,完了就可以安装虚拟机了
就酱



Reply Favorite View the author
All Replies
1 / 2
To page
avatar
ycyc0
deepin
2020-07-19 05:39
#1
查看/var/log/vbox-setup.log
Reply View the author
avatar
leafgreen
deepin
2020-07-19 05:53
#2
关闭了安全启动吗
Reply View the author
avatar
jalawov
deepin
2020-07-19 06:12
#3
没删除老内核的话在grub选择老内核再试试
Reply View the author
avatar
Feng Yu
deepin
2020-07-19 06:36
#4
贴日志啊
Reply View the author
avatar
深圳市耀影科技有限公司
deepin
2020-07-19 06:41
#5
用VM  VOBX我一直没成功过 不知道为啥
Reply View the author
avatar
q77190858
deepin
2020-07-19 08:04
#6
https://bbs.deepin.org/post/197358
关闭了安全启动吗

关闭了安全启动
Reply View the author
avatar
q77190858
deepin
2020-07-19 08:04
#7

日志已经贴了上来,麻烦大神有空看看
Reply View the author
avatar
q77190858
deepin
2020-07-19 08:06
#8
我最后切换到了win10安装了虚拟机。。。
Reply View the author
avatar
残念
deepin
2020-07-19 15:38
#9
最简单的方法就是使用原来的内核
Reply View the author
avatar
fhy
deepin
2020-07-19 16:24
#10
测试 5.4.51 内核下没有问题
Reply View the author
avatar
Feng Yu
deepin
2020-07-19 18:32
#11
本帖最后由 abcfy2 于 2020-7-19 10:46 编辑
https://bbs.deepin.org/post/197358
日志已经贴了上来,麻烦大神有空看看

你用的内核版本太高,virtualbox当前不支持。你只能等virtualbox后续版本更新内容,看看有没有支持你的新内核的更新内容。不要用RC版本的内核,肯定不支持的,virtualbox只会支持稳定版本的内核。

你只能把内核换回去,如果非要升级内核不可,看看virtualbox的官方文档,看看当前版本支持到哪个版本的内核。
具体你可以访问virtualbox的changelog页面: https://www.virtualbox.org/wiki/Changelog 搜索下“kernel”关键字,就知道哪些版本的virtualbox支持到哪些版本的内核了
Reply View the author
avatar
观摩
deepin
2020-07-19 20:05
#12
vbox使用正常,但是操作性感觉跟vmware还是差了不少,现在换用vmware player。虚拟了一个XP,玩玩红警
Reply View the author
avatar
q77190858
deepin
2020-07-21 06:15
#13
https://bbs.deepin.org/post/197358
测试 5.4.51 内核下没有问题

5.4.52的内核测试不行
Reply View the author
avatar
q77190858
deepin
2020-07-21 06:16
#14
https://bbs.deepin.org/post/197358
你用的内核版本太高,virtualbox当前不支持。你只能等virtualbox后续版本更新内容,看看有没有支持你的新 ...

我看vbox官网写已经支持到了5.7了,但是我试了5.4.52的内核还是不行
Reply View the author
avatar
Feng Yu
deepin
2020-07-21 06:50
#15
https://bbs.deepin.org/post/197358
我看vbox官网写已经支持到了5.7了,但是我试了5.4.52的内核还是不行

看了下你的日志输出,你当时的内核版本是5.6,不建议这个,这个已经结束维护了,EOL

但是最后看你的virtualbox版本像是6.0.10,这个肯定是不支持5.6的,不知道你咋装的
Reply View the author
avatar
jerry979
deepin
2020-07-21 16:43
#16
可以用vmware, vmware对于高内核有补丁
Reply View the author
avatar
deepin-mq
deepin
2020-07-21 17:14
#17
用vmware,体验还行
Reply View the author
avatar
q77190858
deepin
2020-07-21 20:07
#18
https://bbs.deepin.org/post/197358
看了下你的日志输出,你当时的内核版本是5.6,不建议这个,这个已经结束维护了,EOL

但是最后看你的virtu ...

我后面换了5.4.52的内核,重装了vbox,还是报错,但是报错信息不一样了,没有日志文件了,信息在帖子的最后我附上去了,还是要求再执行/sbin/vboxconfig,然后出错,要用dmesg看看错误信息
Reply View the author
avatar
q77190858
deepin
2020-07-21 20:07
#19
https://bbs.deepin.org/post/197358
可以用vmware, vmware对于高内核有补丁

好的,我试试
Reply View the author
avatar
q77190858
deepin
2020-07-21 20:08
#20
https://bbs.deepin.org/post/197358
用vmware,体验还行

感谢,我试试vmvare换内核的deepin能不能用
Reply View the author
1 / 2
To page