2 days ago I had some problems with the dependencies of Virtualbox and its extension pack.
The best way to install it is to go to https://www.virtualbox.org/wiki/Downloads
then first download the VirtualBox 5.1.16 Oracle VM VirtualBox Extension Pack (click on all supported platforms, and save that file)
then after that, click above on Linux Distributions, and choose the one for you.
Once done, open a terminal, and as root:
dnf install VirtualBox-5.1-5.........rpm
Once its installed, you will need to add yourself to the "vboxusers" group (file /etc/group at the bottom)
If you don't do that, then the extension pack and the guest additions, (to get accelerated graphics working), won't work.
So, once you have added yourself to the group, reboot
then open Virtualbox, and under File -> Preferences -> Extensions , click on the small icon on the right to "+" (add) , the Extension pack, which should be where you downloaded it.
Once done, then you're ready to roll, and you can pretty much install any OS under that. I got Xenix, Centos, WinXP, Win7, QNX, Solaris, older Fedoras, etc etc.