Install VirtualBox on Fedora 15 or Fedora 16

Download the latest rpm file from http://www.virtualbox.org and install it using:
# yum install dkms <enter>
# rpm -ivh VirtualBox*.rpm <enter>

If after this you get an error of:
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)

# cat /var/log/vbox-install.log <enter>

This shows following message:
/bin/sh: gcc: command not found
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 127
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2

means that you have not installed the gcc compile.

To overcome:
# yum install gcc <enter>

Now re-install VirtualBox.