I'm trying to install VirtualBox (the host, not the client) on a clean install of Alpine 3.8.0 Standard. I'm using VirtualBox-5.2.12-122591-Linux_amd64.run, downloaded from http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html under Linux Platforms > All distributions > 64-bit.
The installer has reported various errors, which so far I've resolved by installing the following packages.
- coreutils (to get readlink with the -e flag available)
- linux-headers (this was probably not needed)
The installer also reported:
/opt/VirtualBox/vboxdrv.sh line 501: can't create /etc/udev/rules.d/60-vboxdrv.rules: \ nonexistent directory.
Which I resolved by simply running:
mkdir -p /etc/udev/rules.d
Each time the installer fails, it says to run /sbin/vboxconfig to restart the setup process. Currently, when I do so, it outputs:
* service vboxdrv added to runlevel default * service vboxballoonctrl-service added to runlevel default * service vboxautostart-service added to runlevel default * service vboxweb-service added to runlevel default vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong. There were problems setting up VirtualBox. To re-start the set-up process, run \ /sbin/vboxconfig as root.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/4.14.52-0-vanilla/build SUBDIRS=/tmp/vbox.0 \ SRCROOT=/tmp/vbox.0 -j1 modules getconf: LFS_CFLAGS: unknown variable getconf: LFS_LDFLAGS: unknown variable getconf: LFS_LIBS: unknown variable Makefile:948: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install \ libelf-dev, libelf-devel or elfutils-libelf-devel." Stop. make: *** [/tmp/vbox.0/Makefile.include.footer:101: vboxdrv] Error 2
I am not able to resolve the problem even by installing libelf-dev. Per https://pkgs.alpinelinux.org/packages, there is no libelf-devel or elfutils-libelf-devel package.
Separately, I can't seem to have elfutils-dev and libelf-dev installed at the same time. If I install one and then the other, apk outputs:
ERROR: elfutils-dev-0.168-r1: trying to overwrite usr/lib/libelf.so owned by \ libelf-dev-0.8.13-r3. ERROR: elfutils-dev-0.168-r1: trying to overwrite usr/lib/libelf.a owned by \ libelf-dev-0.8.13-r3. ERROR: elfutils-dev-0.168-r1: trying to overwrite usr/include/libelf.h owned by \ libelf-dev-0.8.13-r3. ERROR: elfutils-dev-0.168-r1: trying to overwrite usr/include/gelf.h owned by \ libelf-dev-0.8.13-r3. ERROR: elfutils-dev-0.168-r1: trying to overwrite usr/include/nlist.h owned by \ libelf-dev-0.8.13-r3.
That's an issue because elfutils-dev is required by linux-vanilla-dev, which in turn seems to be required by /sbin/vboxconfig. If I run /sbin/vboxconfig without linux-vanilla-dev installed, it outputs:
... vboxdrv.sh: Building VirtualBox 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.
To try to resolve this, I:
- Uninstalled linux-vanilla-dev.
- Installed libelf-dev.
- Reinstalled linux-vanilla-dev.
linux-vanilla-dev and all its dependencies installed successfully, except for elfutils-dev, as expected. I'm not aware of any issues caused by not having elfutils-dev installed, and I assume having libelf-dev installed is more important, since that's the package referred to in the error message in /var/log/vbox-install.log.
Nonetheless, when I run /sbin/vboxconfig, vboxdrv.sh still fails with "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel." This despite that I have libelf-dev installed (or so I believe).
apk info | grep 'libelf-dev'
Running apk fix causes apk to try to reinstall elfutils-dev, which fails (for reasons described previously), but reports no other problems.
I downloaded VirtualBox-5.2.12-122591-Linux_amd64.run to a Windows box and opened it up with 7-Zip and extracted postinst-common.sh (which I believe is the same file as /sbin/vboxconfig) and vboxdrv.sh. I don't see a way to attach them, but I can append their contents (about 600 lines total) if anyone feels it would be helpful.
Please let me know if I can provide any additional information. I'm still working on this so if I learn more I'll add it. My current next steps are:
- Investigate vboxdrv.sh to see if I can find what it does to trigger that error.
- Try using strace.