VirtualBox是一款多功能且功能强大的虚拟化软件,为用户提供了一种在一台物理机上运行多个操作系统的便捷方式。它可用于多个平台,包括Windows,macOS和Linux。无论您是开发人员、系统管理员还是最终用户,VirtualBox 都提供了丰富的特性和功能,可以帮助您充分利用计算环境。
在Fedora 37上安装VirtualBox
第 1 步。在继续之前,请更新您的 Fedora 操作系统以确保所有现有软件包都是最新的。使用此命令更新服务器软件包:
<span class="pln">sudo dnf upgrade sudo dnf update sudo dnf install kernel</span><span class="pun">-</span><span class="pln">headers kernel</span><span class="pun">-</span><span class="pln">devel dkms elfutils</span><span class="pun">-</span><span class="pln">libelf</span><span class="pun">-</span><span class="pln">devel qt5</span><span class="pun">-</span><span class="pln">qtx11extras gcc make perl bzip2</span>
第 2 步。在Fedora 37上安装VirtualBox。
默认情况下,VirtualBox 软件包不在默认的 Fedora 37 存储库中。现在运行以下命令将 VirtualBox 存储库添加到您的 Fedora 系统中:
<span class="pln">cat </span><span class="pun"><<</span><span class="pln">EOF </span><span class="pun">|</span><span class="pln"> sudo tee </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">yum</span><span class="pun">.</span><span class="pln">repos</span><span class="pun">.</span><span class="pln">d</span><span class="pun">/</span><span class="pln">virtualbox</span><span class="pun">.</span><span class="pln">repo </span><span class="pun">[</span><span class="pln">virtualbox</span><span class="pun">]</span><span class="pln"> name</span><span class="pun">=</span><span class="typ">Fedora</span><span class="pln"> $releasever </span><span class="pun">-</span><span class="pln"> $basearch </span><span class="pun">-</span> <span class="typ"><a href="https://www.edge66.com/edgetag/virtualbox" title="查看更多关于VirtualBox的文章" target="_blank">VirtualBox</a></span><span class="pln"> baseurl</span><span class="pun">=</span><span class="pln">http</span><span class="pun">:</span><span class="com">//download.virtualbox.org/virtualbox/rpm/fedora/36/\$basearch</span><span class="pln"> enabled</span><span class="pun">=</span><span class="lit">1</span><span class="pln"> gpgcheck</span><span class="pun">=</span><span class="lit">1</span><span class="pln"> repo_gpgcheck</span><span class="pun">=</span><span class="lit">1</span><span class="pln"> gpgkey</span><span class="pun">=</span><span class="pln">https</span><span class="pun">:</span><span class="com">//www.virtualbox.org/download/oracle_vbox.asc</span><span class="pln"> EOF</span>
接下来,使用以下命令导入 GPG 密钥:
<span class="pln">wget </span><span class="pun">-</span><span class="pln">q https</span><span class="pun">:</span><span class="com">//www.virtualbox.org/download/oracle_vbox.asc -O- | rpm --import -</span>
添加存储库后,现在通过运行以下命令安装最新版本的 VirtualBox 包:
<span class="pln">sudo dnf install </span><span class="typ">VirtualBox</span><span class="pun">-</span><span class="lit">7.0</span>
第 3 步。将用户添加到 Vboxusers 组。
该组是在安装过程中自动创建的。将您的用户帐户添加到此组以操作VirtualBox,而无需:vboxusers
sudo
<span class="pln">sudo usermod </span><span class="pun">-</span><span class="pln">a </span><span class="pun">-</span><span class="pln">G vboxusers $USER newgrp vboxusers</span>
第 3 步。在Fedora 37上访问VirtualBox。
安装完成后,您可以通过在终端中输入以下命令来启动它。或者,您可以从桌面环境中的应用程序菜单中启动VirtualBox。virtualbox
感谢您使用本教程在您的 Fedora 37 系统上安装 VirtualBox。如需其他帮助或有用信息,我们建议您查看官方 VirtualBox 网站。