English
Ask Your Question
0

fedora-20 - VirtualBox - Kernel Sources Missing

asked 2014-06-15 11:02:30 +0000

shingdayho gravatar image

updated 2014-09-13 03:58:59 +0000

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 13:01:05 +0000

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 ( 2014-06-15 17:15:44 +0000 )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 ( 2016-09-06 18:24:04 +0000 )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 ( 2016-09-11 11:11:39 +0000 )edit
0

answered 2014-06-17 00:30:03 +0000

FredH gravatar image

updated 2014-06-17 01:15:04 +0000

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 ( 2015-10-08 17:57:28 +0000 )edit
0

answered 2015-10-08 17:23:43 +0000

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 2015-05-12 19:54:53 +0000

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

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

Follow
1 follower

Stats

Asked: 2014-06-15 11:02:30 +0000

Seen: 24,239 times

Last updated: Jun 17 '14