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.