LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-08-2018, 12:27 PM   #1
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Virtualbox 5.2.8 cannot find the kernel source Slackware64-current


I am running the latest Slackware64-current (today, 2018/03/08). I updated my system as usual with slackpkg and now virtualbox cannot find the kernel source on my system upon reboot. I am using the Virtualbox installer from their web site. Here is the output I get:

Code:
root@mothership:~# cd /opt
root@mothership:/opt# ls
VirtualBox-5.2.8-121009-Linux_amd64.run
root@mothership:/opt# sh VirtualBox-5.2.8-121009-Linux_amd64.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.............
VirtualBox Version 5.2.8 r121009 (2018-02-26T15:44:11Z) installer
Installing VirtualBox to /opt/VirtualBox
Python found: python, installing bindings...
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.

VirtualBox has been installed successfully.

You will find useful information about using VirtualBox in the user manual
  /opt/VirtualBox/UserManual.pdf
and in the user FAQ
  http://www.virtualbox.org/wiki/User_FAQ

We hope that you enjoy using VirtualBox.

The installation log file is at /var/log/vbox-install.log.
The vbox-install.log has the following:

Code:
root@mothership:/opt# cat /var/log/vbox-install.log 

VirtualBox 5.2.8 r121009 installer, built 2018-02-26T15:44:11Z.

Testing system setup...
Installing VirtualBox to /opt/VirtualBox

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
/tmp/vbox.0/Makefile.include.header:141: *** Error: unable to find the headers of the Linux kernel to build against. Specify KERN_VER=<version> (currently 4.14.24) and run Make again.  Stop.
I didn't have any problems with the 4.14.23 headers. I am going around in circles with this and any input is very welcome.

I did try running the following with the same results:

Code:
KERN_VER=4.14.24 sh VirtualBox-5.2.8-121009-Linux_amd64.run
I think maybe this could be the culprit? Wrong symlink?

Code:
root@mothership:/opt# ls -l /lib/modules/4.14.24/build
lrwxrwxrwx 1 root root 48 Mar  8 10:59 /lib/modules/4.14.24/build -> /tmp/package-kernel-source/usr/src/linux-4.14.24
root@mothership:/opt# cd /lib/modules/4.14.24/build
-su: cd: /lib/modules/4.14.24/build: No such file or directory
After creating the correct symlink, vbox kernel modules build fine.

Last edited by mralk3; 03-08-2018 at 12:39 PM.
 
Old 03-08-2018, 12:32 PM   #2
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Original Poster
Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Solution:

Code:
cd /lib/modules/4.14.24
rm build source
ln -sv  /usr/src/linux-4.14.24/ source
ln -sv  /usr/src/linux-4.14.24/ build
Then rerun the vbox install script.
 
4 members found this post helpful.
Old 03-08-2018, 08:08 PM   #3
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Original Poster
Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Thu Mar 8 21:52:05 UTC 2018
a/kernel-modules-4.14.24-x86_64-2.txz: Rebuilt.
Fixed "build" and "source" symlinks.
+--------------------------+
Marking thread as solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel-package fails to compile kernel headers on (*)Ubuntu 16.04.2 donald3.heckel Linux - Software 2 05-26-2017 08:44 PM
Issue with kernel headers with VirtualBox install. samBl Linux - Kernel 2 08-29-2013 08:38 PM
[SOLVED] Updated to kernel 3.0.4 but now source package can not find kernel headers. ReaperX7 Slackware 2 10-03-2011 06:48 PM
linux-headers package on a VPS? (Couldn't find package) FEL Linux - Newbie 8 04-06-2009 11:45 AM
Automatic removal of kernel headers package when kernel packages are removed bgoodr Debian 3 12-30-2008 08:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration