在官网下载virtualbox

简介

VirtualBox是一款强大的x86和AMD64/Intel64虚拟化产品,适用于企业和家庭。VirtualBox不仅是为企业客户提供的一款功能丰富、高性能的产品,它也是根据GNU通用公共许可证(GPL)版本3条款作为开放源码软件免费提供的唯一专业解决方案。有关VirtualBox的介绍请参见“关于VirtualBox”。

目前,VirtualBox运行在Windows、Linux、Macintosh和Solaris主机上,支持大量客户操作系统,包括但不限于Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7, Windows 8, Windows 10), DOS/Windows 3。x, Linux (2.4, 2.6, 3)Solaris和OpenSolaris、OS/2和OpenBSD。

VirtualBox正在积极地开发,频繁地发布版本,并拥有不断增长的功能列表,支持它所运行的客户操作系统和平台。VirtualBox是一个由专门公司支持的社区努力:鼓励每个人都做出贡献
下载链接
在这里插入图片描述
有很多linux发行版,选择适合自己的版本下载,我这里是centos7
在这里插入图片描述

安装

yum -y install VirtualBox-6.1-6.1.32_149290_el7-1.x86_64.rpm

报错处理

缺少libSDL-1.2.so.0 依赖在这里插入图片描述

下载链接
在这里插入图片描述

The vboxdrv kernel module is not loaded.

在这里插入图片描述
安装OS 的时候没有安装kernel-moduel 等相关依赖。/sbin/vboxconfig 往内核编译virtualbox相关模块时报错。infra协助挂载hel-server-7.8-x86_64-dvd.iso 进行安装后解决。

[root@179-sc /monitor/monitor-vagrant/meta]#vagrant up
No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#vagrant up --provider=VirtualBox
The provider 'VirtualBox' could not be found, but was requested to
back the machine 'meta'. Please use a provider that exists.

Did you mean 'virtualbox'?

Vagrant knows about the following providers: docker, hyperv, virtualbox
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#vagrant up --provider=virtualbox
The provider 'virtualbox' that was requested to back the machine
'meta' is reporting that it isn't usable on this system. The
reason is shown below:

VirtualBox is complaining that the kernel module is not loaded. Please
run `VBoxManage --version` or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.
[root@179-sc /monitor/monitor-vagrant/meta]#^C
[root@179-sc /monitor/monitor-vagrant/meta]#^C
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#VBoxManage --version
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.10.0-1127.el7.x86_64) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /sbin/vboxconfig

         You will not be able to start VMs until this problem is fixed.
6.1.32r149290
[root@179-sc /monitor/monitor-vagrant/meta]#^C
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#
[root@179-sc /monitor/monitor-vagrant/meta]#/sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-1127.el7.x86_64
This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-1127.el7.x86_64

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

[root@179-sc /]#ll /etc/yum.repos.d/
total 8
-rw-r--r-- 1 root root  55 Nov  4 15:31 123.repo
-rw-r--r-- 1 root root 358 Nov  4 15:31 redhat.repo
[root@179-sc /]#
[root@179-sc /]#
[root@179-sc /]#yum -y install gcc
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Package gcc-4.8.5-39.el7.x86_64 already installed and latest version
Nothing to do
[root@179-sc /]#
[root@179-sc /]#
[root@179-sc /]#VBoxManage --version
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.10.0-1127.el7.x86_64) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /sbin/vboxconfig

         You will not be able to start VMs until this problem is fixed.
6.1.32r149290
[root@179-sc /]#
[root@179-sc /]#
[root@179-sc /]#/sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

Logo

更多推荐