Ask Your Question
0

fedora-20 - VirtualBox - Kernel Sources Missing

asked 2014-06-15 06:02:30 -0500

shingdayho gravatar image

updated 2014-09-12 22:58:59 -0500

mether gravatar image

Hey guys,

I've had a look at some other posts relating to issues with VirtuablBox but I haven't found a solution for my issue there.

I cannot load VirtuablBox as it states that the 'Kernel Driver' is not installed and recommends to run '/etc/init.d/vboxdrv setup', when I run it I get the errors;

Makefile:183: * Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop. Makefile:183: </directory> Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop. Makefile:192: </directory> Error: KERN_DIR does not point to a directory. Stop. Makefile:192: Error: KERN_DIR does not point to a directory. Stop. Makefile:183: Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop. Makefile:183: *</directory> Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.</directory>

Makefile:192: * Error: KERN_DIR does not point to a directory. Stop.

[root@home 3.14.6-200.fc20.x86_64]# uname -r 3.14.6-200.fc20.x86_64

[root@home 3.14.6-200.fc20.x86_64]# echo $KERN_DIR /usr/src/kernels/3.14.6-200.fc20.x86_64/

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2014-06-15 08:01:05 -0500

hedayat gravatar image

install kernel-devel package:

yum install kernel-devel

Notice that the kernel-devel package version must match the version of your running kernel. If you don't want to update your kernel, you should install the version equal to the output of uname -r:

yum install kernel-devel-$(uname -r)
edit flag offensive delete link more

Comments

I did try the above but it didnt work, I re-formated the machine and after making sure everything was upto date I installed the kernel-devel-$(uname -r) as suggested, then installed VirtualBox and now it works like a treat! Thanks!

shingdayho gravatar imageshingdayho ( 2014-06-15 12:15:44 -0500 )edit

This worked exactly for me on Fedora 24. Running into the same issue, ran kernel-devel-$(uname -r), worked like a charm. Thank you!

abear gravatar imageabear ( 2016-09-06 13:24:04 -0500 )edit

:) You're welcome. The only change that I can expect in a near future is to use dnf instead of yum in the above commands, since yum will probably stop working sooner or later.

hedayat gravatar imagehedayat ( 2016-09-11 06:11:39 -0500 )edit
0

answered 2015-10-08 12:23:43 -0500

This solution works for Fedora 22 as well, except replace yum with dnf:

$ sudo dnf install kernel-devel-$(uname -r)
$ sudo dnf install gcc
$ sudo /sbin/rcvboxdrv setup
edit flag offensive delete link more
0

answered 2014-06-16 19:30:03 -0500

FredH gravatar image

updated 2014-06-16 20:15:04 -0500

Hi, I think there must have been something up with the dependant kernel, My yum updates are getting this message:

Error: Package: kmod-VirtualBox-3.14.6-200.fc20.x86_64-4.3.12-1.fc20.2.x86_64 (rpmfusion-free-updates)
           Requires: kernel-uname-r = 3.14.6-200.fc20.x86_64
           Installed: kernel-3.14.4-200.fc20.x86_64 (@updates)
               kernel-uname-r = 3.14.4-200.fc20.x86_64
           Installed: kernel-3.14.5-200.fc20.x86_64 (@updates)
               kernel-uname-r = 3.14.5-200.fc20.x86_64
           Installed: kernel-3.14.7-200.fc20.x86_64 (@updates)
               kernel-uname-r = 3.14.7-200.fc20.x86_64
           Available: kernel-3.11.10-301.fc20.x86_64 (fedora)
               kernel-uname-r = 3.11.10-301.fc20.x86_64
           Available: kernel-debug-3.11.10-301.fc20.x86_64 (fedora)
               kernel-uname-r = 3.11.10-301.fc20.x86_64+debug
           Available: kernel-debug-3.14.7-200.fc20.x86_64 (updates)
               kernel-uname-r = 3.14.7-200.fc20.x86_64+debug

We are probably waiting for the new kmod for the newer kernel, usually only takes a couple of days for the fine work to get done. If your system is broken, i'd suggest rolling back the VirtualBox install and boot with an older kernel for the moment. look into yum downgrade

edit flag offensive delete link more

Comments

This might be better as its own separate question?

layton.everson gravatar imagelayton.everson ( 2015-10-08 12:57:28 -0500 )edit
0

answered 2015-05-12 14:54:53 -0500

I just installed Fedora 21 in my work laptop and I got the exact same issue, followed this thread and it works just fine

# yum install kernel-devel-$(uname -r)
# yum install gcc
# /etc/init.d/vboxdrv setup

After that I discarded the VM and booted it right up. It now runs as smoothly as before.

I can confirm that this solution works on Fedora 21

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

Stats

Asked: 2014-06-15 06:02:30 -0500

Seen: 25,437 times

Last updated: Jun 16 '14