All,

I am attempting to run Fedora 27 on VBox with an OSX host. I cannot seem to set up a shared directory. I have done this sort of thing many times in the past with other Linuxes, but not with Fedora.

How to fix?

I have a share setup in VBox called scap-data. But when I run:

Code:
$ sudo mount -t vboxsf scap-data /mnt/scap-data

I get the error:

Code:
/sbin/mount.vboxsf: mounting failed with the error: No such device

I googled this error and was told to do this:

Code:
$ cd /opt/VBoxGuestAdditions-5.2.6/init
$ sudo ./vboxadd setup

I get the error:

Code:
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
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.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-4.14.14-300.fc27.x86_64
groupadd: group 'vboxadd' already exists
ValueError: File context for /opt/VBoxGuestAdditions-5.2.6/other/mount.vboxsf already defined
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
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.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-4.14.14-300.fc27.x86_64
groupadd: group 'vboxadd' already exists
modprobe vboxguest failed
The log file /var/log/vboxadd-setup.log may contain further information.

I check the log file as the message advises and I find this :

Code:
<output>
*** Error: unable to find the headers of the Linux kernel to build against. Specify KERN_VER=<version> (currently 4.14.14-300.fc27.x86_64) and run Make again.
<more output>

I have the correct headers installed. Apparently, vboxadd can't find them. I tried exporting the KERN_VER environment variable:

Code:
$ export KERN_VER="4.14.14-300.fc27.x86_64"

But no good.