Ask Your Question

Install VirtualBox on Fedora27

asked 2018-08-07 05:00:22 -0500

DiegoV gravatar image

updated 2018-08-07 06:59:19 -0500

hhlp gravatar image

Hi all, I am new to the Fedora world. I am trying to install VirtualBox but I got stuck.

Here what I have done:

sudo dnf update

Check that I am runnig the lates kernel version

rpm -qa kernel | sort -V | tail -n 1
uname -r

This was not the case so:

sudo reboot

Install relevant pakages:

sudo dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

Install VB:

sudo dnf install VirtualBox-5.2

This was not found. I thus installed (maybe wrong!):

sudo dnf install VirtualBox

Now If I run:


I get:

WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.17.11-100.fc27.x86_64) or it failed to load. Please try load the kernel module by executing as root

       dnf install akmod-VirtualBox kernel-devel-4.17.11-100.fc27.x86_64
       akmods --kernels 4.17.11-100.fc27.x86_64 && systemctl restart systemd-modules-load.service

You will not be able to start VMs until this problem is fixed.

Tryed to execute the above command I get:

Last metadata expiration check: 0:00:00 ago on Tue 07 Aug 2018 11:58:18 AM CEST.
Package akmod-VirtualBox-5.2.16-1.fc27.x86_64 is already installed, skipping.
Package kernel-devel-4.17.11-100.fc27.x86_64 is already installed, skipping.
No match for argument: akmods--kernels
No match for argument: 4.17.11-100.fc27.x86_64
Error: Unable to find a match

Could you please help me with that??

edit retag flag offensive close merge delete


Did you consider using Gnome Boxes instead? It is most likely already installed.

villykruse gravatar imagevillykruse ( 2018-08-07 11:44:42 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted

answered 2018-08-11 09:31:11 -0500

chiguy1256 gravatar image

I have ran into the same issue and have upgraded to Fedora 28. Still no luck. I found this link that discuss the UEFI secure boot issue for VirtualBox. I tried to follow the instructions and I still can't get it to work. I would like to keep UEFI secure boot on.

edit flag offensive delete link more

answered 2018-08-07 14:25:22 -0500

updated 2018-08-07 14:43:33 -0500

gain root access


cd /etc/yum.repos.d/


remove all previous installations and it's configurations


dnf  update

dnf install VirtualBox-5.2

Rebuild kernel modules with following command:

/usr/lib/virtualbox/ setup

( You may get the kernel module rebuilding script from here also )

Add virtualbox user/users to group

usermod -a -G vboxusers user_name

( Replace user_name with your own user name or some another real user name )

please note : You may need to set KERNDIR environment variable manually , if required ## Current running kernel on Fedora ## KERNDIR=/usr/src/kernels/uname -r, and set secure boot option disabled

edit flag offensive delete link more

answered 2018-08-07 11:42:43 -0500

villykruse gravatar image

akmods --kernels 4.17.11-100.fc27.x86_64 is to be run as a command after you installed the akmod_VirtualBox and kernel-devel modules. If you don't do that, it will be done automatically when you reboot. The message you posted suggests that you tried to install the akmods--kernels and 4.17.11-100.fc27.x86_64 as software packages.

Also, when installing a new kernel, the akmods command is run automatically. Just make sure to let it finish before rebooting.

edit flag offensive delete link more

answered 2018-08-07 08:28:06 -0500

bob323 gravatar image

Your problem is not (entirely) with akmods. See this answer for a guide on the full process to get VirtualBox working. Oracle has unfortunately decided to allow the process to become much more complicated than it needs to be since they refuse to sign their kernel modules, thus preventing them from being loaded on systems with Secure Boot (pretty much every modern PC). The solution is to sign them yourself (or disable Secure Boot).

Installing the VirtualBox package is fine. VirtualBox-5.2 won't appear unless you've added the Oracle repositories to dnf. While this wouldn't hurt, I'm not sure it's entirely necessary either as long as you have RPMFusion installed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-08-07 05:00:22 -0500

Seen: 46 times

Last updated: Aug 07