VirtualBox想必大家都不陌生,做Linux开发的尤其是嵌入式Linux开发的人应该基本都知道或玩过VMware和VirtualBox。但通常都是为了在Windows电脑上能够使用Linux环境、即在Windows环境下通过下载可执行文件安装的VirtualBox。本文介绍在Linux环境(Ubuntu 22.04.1 TLS)下安装VirtualBox,并且是通过源码编译的方式,而非apt下载安装的方式。
1. VirtualBox主页
VirtualBox的官网地址为:
https://www.virtualbox.org/
主页界面如下所示:
2. VirtualBox下载页
在上图中点击“Download VirtualBox 7.0”或者点击左侧的“Downloads”,会进入到下载页面,链接为:https://www.virtualbox.org/wiki/Downloads
页面如下所示:
3. 下载源码
源码下载的方式和链接有很多,本文只介绍其中的一种。
鼠标左键点击上图中“VirtualBox Sources”下的“Source code”,即可开始源码下载。如下图所示:
4. VirtualBox上游网址
这里顺便提一下VirtualBox的上游网址。在步骤2的图中选择“VirtualBox Sources” -> “Browse the source code repository”,进入到以下链接:
https://www.virtualbox.org/browser/vbox/trunk
页面如下:
这就是VirtualBox的上游网址。其中的代码是当前正在开发的源码,是并不保证稳定的。