安装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
2 / 2
To page
avatar
Feng Yu
deepin
2020-07-21 23:52
#21
https://bbs.deepin.org/post/197358
我后面换了5.4.52的内核,重装了vbox,还是报错,但是报错信息不一样了,没有日志文件了,信息在帖子的最 ...

你换内核的操作肯定是错误的,那么多no such file or directory,肯定不对

你还是别换内核了,用自带内核啥问题都没有,驱动问题也别相信论坛那些半吊子瞎JB带节奏,乱换内核问题更多,如果你不是Linux熟练用户不要乱换内核。自带内核啥驱动问题都没有,有问题找官方问问,别自己瞎搞
Reply View the author
avatar
q77190858
deepin
2020-07-22 02:23
#22
https://bbs.deepin.org/post/197358
你换内核的操作肯定是错误的,那么多no such file or directory,肯定不对

你还是别换内核了,用自带内 ...

我用安装deb的方式更换的内核,主要是原来的内核对我的小新air14支持不好,驱动不兼容,现在我切换到win10下面安装了虚拟机,需求暂时解决了,虽然没有成功,还是感谢你的指导
Reply View the author
avatar
bbyzjs
deepin
2020-09-13 21:43
#23
不能为虚拟电脑 windows7 打开一个新任务.

The virtual machine 'windows7' has terminated unexpectedly during startup with exit code 1 (0x1).

返回 代码: NS_ERROR_FAILURE (0x80004005)
组件: MachineWrap
界面: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

Reply View the author
avatar
rekees2020
deepin
2020-09-13 21:48
#24
5.7.7内核正常
Reply View the author
avatar
haohu1193
deepin
2020-09-13 22:00
#25
本帖最后由 haohu1193 于 2020-9-13 14:01 编辑

登入root账户后,直接执行:/sbin/vboxconfig ,等它自动完成就好了...



没有设置过root账户密码的,先设置密码:sudo passwd ,先输入安装软件sudo时的密码,再输入2次新的root密码,与sudo的密码可以不一样...密码设置完成后再执行以上步骤...
Reply View the author
2 / 2
To page