Oracle Corporation Team has released its new major version VirtualBox 6.0.4 on 28 January 2019. In this release VirtualBox has improves stability and fixes regressions. To read more about this release read changelog. This article will help you to install
Step 1 – Prerequsities
First of all, configure the VirtualBox DNF repository on your system. You can simply download the repo file from its official site and place it under at /etc/yum.repos.d/virtualbox.repo. Navigate to /etc/yum.repos.d directory and use one of below commands as per your operating system.
cd /etc/yum.repos.d/ sudo wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
Before installing VirtualBox make sure to install all required packages to run VirtualBox like kernel-headers, kernel-devels etc. Use the following command to install the required packages.
sudo dnf install binutils gcc make patch libgomp dkms qt5-qtx11extras libxkbcommon sudo dnf install glibc-headers glibc-devel kernel-headers kernel-devel compat-libvpx4
After installing latest kernel and kernel headers, let’s reboot your system and start with Latest kernel.
Step 2 – Configure Environment
VirtualBox installation required kernel source code to install required modules, So we need to configure environment variable KERN_DIR to which VirtualBox get kernel source code. In my case latest kernel source is available in 4.16.5-300.fc28.x86_64 directory under /usr/src/kernels/ . Make sure you are using correct source path.
export KERN_DIR=/usr/src/kernels/`uname -r` echo $KERN_DIR /usr/src/kernels/4.16.5-300.fc28.x86_64
Step 3 – Install VirtualBox on Fedora
Use the following command to install VirtualBox using DNF command line tool. It will install the latest version of VirtualBox 6.0 on your system.
sudo dnf install VirtualBox-6.0
After installation, we need to rebuild kernel modules using the following command.
Step 4 – Launch VirtualBox
Use following command to start VirtualBox from X windows. You can switch to GUI mode using init 5 or startx commands from terminal.