[Solved] Cannot build VirtualBox kernel modules on Fedora 27

Discussions about using Linux guests in VirtualBox.
Post Reply
Shell32
Posts: 3
Joined: 5. Jul 2018, 19:52

[Solved] Cannot build VirtualBox kernel modules on Fedora 27

Post by Shell32 »

I just installed VirtualBox Version 5.2.14 r123301 and cannot run the virtual machine.
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.17.3-100.fc27.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.
I run the vboxconfig
sudo vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
The log is
> cat /var/log/vbox-setup.log
Building the main VirtualBox module.
Error building the module:
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/4.17.3-100.fc27.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j24 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
Makefile:974: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.
make: *** [/tmp/vbox.0/Makefile.include.footer:101: vboxdrv] Error 2
I am sure I have installed elfutils-libelf-devel in my system.
> sudo dnf install elfutils-libelf-devel
No read/execute access in current directory, moving to /
Last metadata expiration check: 1:42:46 ago on Thu 05 Jul 2018 09:19:07 AM PDT.
Package elfutils-libelf-devel-0.170-10.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
I have no idea how to figure out this problem. Can anyone help? Thanks.

My kernel version
> uname -rvs
Linux 4.17.3-100.fc27.x86_64 #1 SMP Tue Jun 26 14:19:03 UTC 2018
My OS version
> lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 27 (Twenty Seven)
Release: 27
Codename: TwentySeven
Last edited by socratis on 27. Jul 2018, 14:53, edited 1 time in total.
Reason: Marked as [Solved].
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot build VirtualBox kernel modules on Fedora 27

Post by socratis »

Shell32 wrote:
please install libelf-dev, libelf-devel or elfutils-libelf-devel
Shell32 wrote:I am sure I have installed elfutils-libelf-devel in my system
What about the other two? Did you try to install them?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Shell32
Posts: 3
Joined: 5. Jul 2018, 19:52

Re: Cannot build VirtualBox kernel modules on Fedora 27

Post by Shell32 »

libelf-dev and libelf-devel are not in the package repository. Do I need to compile it from the source code?
grimmjow_sms
Posts: 7
Joined: 13. Jul 2018, 16:56

Re: Cannot build VirtualBox kernel modules on Fedora 27

Post by grimmjow_sms »

HI...

I am having this same issue, and I have installed the libelf: devel and dev as well elfutils.
And the issue keeps comming,

But my OS is Centos
Shell32
Posts: 3
Joined: 5. Jul 2018, 19:52

Re: Cannot build VirtualBox kernel modules on Fedora 27

Post by Shell32 »

After updating to 5.2.16 r123759, the issue is fixed.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot build VirtualBox kernel modules on Fedora 27

Post by socratis »

Great, thanks for the feedback. Marking as [Solved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply