Linux环境安装VirtualBox

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

在官网下载virtualbox


简介


irtualBox是一款强大的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是一个由专门公司支持的社区努力:鼓励每个人都做出贡献

下载链接acc87c7eb010436a88871888ed87c6f4.png有很多linux发行版,选择适合自己的版本下载,我这里是centos78c131cfa3f774b5e8d821c3af8caff31.png

安装


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

报错处理


缺少libSDL-1.2.so.0 依赖


3651fb78afbc470f8a7aee9d34edf6e4.png下载链接0867434f8db0496d80908d1e822170c1.png

The vboxdrv kernel module is not loaded.


8d571b2ebd66478792e9899307db26bb.png安装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.
相关实践学习
CentOS 7迁移Anolis OS 7
龙蜥操作系统Anolis OS的体验。Anolis OS 7生态上和依赖管理上保持跟CentOS 7.x兼容,一键式迁移脚本centos2anolis.py。本文为您介绍如何通过AOMS迁移工具实现CentOS 7.x到Anolis OS 7的迁移。
目录
相关文章
|
9天前
|
NoSQL 关系型数据库 Redis
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
mall在linux环境下的部署(基于Docker容器),docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongodb、minio详细教程,拉取镜像、运行容器
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
|
15天前
|
前端开发 Linux
深度探索Linux操作系统 —— 构建桌面环境3
深度探索Linux操作系统 —— 构建桌面环境
28 12
|
8天前
|
Shell Linux API
C语言在linux环境下执行终端命令
本文介绍了在Linux环境下使用C语言执行终端命令的方法。首先,文章描述了`system()`函数,其可以直接执行shell命令并返回结果。接着介绍了更强大的`popen()`函数,它允许程序与命令行命令交互,并详细说明了如何使用此函数及其配套的`pclose()`函数。此外,还讲解了`fork()`和`exec`系列函数,前者创建新进程,后者替换当前进程执行文件。最后,对比了`system()`与`exec`系列函数的区别,并针对不同场景推荐了合适的函数选择。
|
15天前
|
存储 搜索推荐 Linux
深度探索Linux操作系统 —— 构建桌面环境1
深度探索Linux操作系统 —— 构建桌面环境
30 8
|
15天前
|
Linux 编译器 C语言
深度探索Linux操作系统 —— 构建桌面环境2
深度探索Linux操作系统 —— 构建桌面环境
24 6
|
17天前
|
应用服务中间件 Linux 网络安全
【Azure 应用服务】App Service for Linux 环境中为Tomcat页面修改默认的Azure 404页面
【Azure 应用服务】App Service for Linux 环境中为Tomcat页面修改默认的Azure 404页面
|
19天前
|
Ubuntu Linux 开发工具
【事件中心 Azure Event Hub】在Linux环境中(Ubuntu)安装Logstash的简易步骤及配置连接到Event Hub
【事件中心 Azure Event Hub】在Linux环境中(Ubuntu)安装Logstash的简易步骤及配置连接到Event Hub
|
18天前
|
JSON Linux 网络安全
【Azure 应用服务】如何从App Service for Linux 的环境中下载Container中非Home目录下的文件呢?
【Azure 应用服务】如何从App Service for Linux 的环境中下载Container中非Home目录下的文件呢?
|
20天前
|
机器学习/深度学习 Ubuntu Linux
【机器学习 Azure Machine Learning】使用Aure虚拟机搭建Jupyter notebook环境,为Machine Learning做准备(Ubuntu 18.04,Linux)
【机器学习 Azure Machine Learning】使用Aure虚拟机搭建Jupyter notebook环境,为Machine Learning做准备(Ubuntu 18.04,Linux)
|
18天前
|
关系型数据库 MySQL Linux
Linux环境安装MySQL8.0.36使用rpm包安装,安装顺序是什么?
【8月更文挑战第23天】Linux环境安装MySQL8.0.36使用rpm包安装,安装顺序是什么?
91 1

热门文章

最新文章