In this tutorial, you will learn how to install VirtualBox 6.1 on Fedora 33. VirtualBox 6.1 is available for installation in most Linux platforms package repositories.
Install VirtualBox 6.x on Fedora 33
Download VirtualBox 6.1 RPM
To begin with, download VirtualBox 6.1 for Fedora 32 from their official site;
wget https://download.virtualbox.org/virtualbox/6.1.16/VirtualBox-6.1-6.1.16_140961_fedora32-1.x86_64.rpm
If you try to install, you will get an error as shown below;
Last metadata expiration check: 0:19:24 ago on Tue 12 Jan 2021 10:41:01 PM GMT.
Error:
Problem: conflicting requests
- nothing provides python(abi) = 3.8 needed by VirtualBox-6.1-6.1.16_140961_fedora32-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages)
As the error denotes, Python3.8 is tied to this rpm package (=3.8) and it can’t be found on the system.
You can check the available Python version as follows;
ls /usr/bin/python*
/usr/bin/python
/usr/bin/python2
/usr/bin/python2.7
/usr/bin/python2.7-config
/usr/bin/python2-config
/usr/bin/python3
/usr/bin/python3.9
/usr/bin/python-argcomplete-check-easy-install-script
/usr/bin/python-argcomplete-tcsh
The latest version is Python 3.9. Downgrading to Python 3.8 would affect other packages relying on version 3.9.
You therefore need to rebuild the package to use Python 3.9 and above.
Install Required Build packages
Install the following packages required in the next steps;
sudo dnf -y install rpmrebuild binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms qt5-qtx11extras libxkbcommon
Rebuild VirtualBox
Now you can use rpmrebuild edit Python 3.8 requirement. Navigate to where you downloaded the rpm file, in my case is the current working directory;
ls
VirtualBox-6.1-6.1.16_140961_fedora32-1.x86_64.rpm
and run the following command;
sudo rpmrebuild --change-spec-preamble='sed -e "s/32/33/"' --change-spec-requires='sed -e "s/python(abi) = 3.8/python(abi) >= 3.8/"' --package VirtualBox-6.1-6.1.16_140961_fedora32-1.x86_64.rpm
The command will run for some few minutes. When it completes, you will see the last line similar to the following;
result: /root/rpmbuild/RPMS/x86_64/VirtualBox-6.1-6.1.16_140961_fedora33-1.x86_64.rpm
Install VirtualBox 6.1
The new rpm is found in the directory shown by the above line.
cd ~/rpmbuild/RPMS/x86_64/
sudo dnf -y install ./VirtualBox-6.1-6.1.16_140961_fedora33-1.x86_64.rpm
The installation will progress to completion.
You also need to rebuild kernel modules for this new package;
sudo /usr/lib/virtualbox/vboxdrv.sh setup
Add Users to vboxusers Group
The final step is to add the current user to vboxusers group;
sudo usermod -aG vboxusers $USER
Running VirtualBox 6.1 on Fedora 33
VirtualBox 6.1 is now successfully installed on Fedora 33. You can launch from desktop application or run the following command in terminal;
VirtualBox
That marks the end of our tutorial on how to install VirtualBox 6.1 in Fedora 33.
Other Related Tutorials
Install VirtualBox Guest Additions on Kali Linux 2020.3
Install Kali Linux 2020.3 on VirtualBox
After followup steps I have faced this problem :
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing
Fedora33
I try to install VM Box via the shell , I get this error message :
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (5.10.13-200.fc33.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.
Qt WARNING: QSocketNotifier: Can only be used with threads started with QThread
Segmentation fault (core dumped)
Hello Abdul,
Your error is related to Wayland. Apparently QSocketNotifier is not compatible with Wayland. You can switch to Xorg if you don’t mind.