Installing VirtualBox

Contents

Virtualbox 5.1

The primary reason for the new kernel was to get a sufficiently up to date kernel that would allow me to run VirtualBox on laptop. The 4.5.7 kernel I was using was missing header files, with the result that I couldn’t compile the necessary VirtualBox drivers. (As noted above, the later Fedora 23 kernels had an extremely annoying video driver bug.)

But … the drivers wouldn’t compile on the new kernel due to various errors. To fix that, I added an RPM repository for VirtualBox, and from there installed version 5.1.38 that had been compiled for Fedora 22. That version worked without complaint, and for some reason didn’t even need to compile kernel drivers.

So it’s possible all the work I put into compiling a new kernel was wasted. (Although it’s also possible the newer versions of VirtualBox wouldn’t run on the older kernels.)

Virtualbox 5.2

The Virtualbox website has a download for the latest version (5.2.12) for Linux with the description “All distributions (built on EL5 and therefore do not require recent system libraries)”. As a test, I uninstalled the 5.1.5 RPM, then downloaded and installed the 5.2.12 generic one.

VirtualBox idiotic design

Although VirtualBox 5.2.12 unpacked, installed, and ran, I quickly ran into problems. When I went to install the Extension Pack, it failed with an unlikely error:

Failed to install the Extension Pack Oracle_VM_VirtualBox_Extension_Pack-5.2.12.vbox-extpack
from /var/local/archive.

The installer failed with exit code 1:
VBoxExtPackHelperApp: error: argv[0] does not match the executable image path:
  '/opt/VirtualBox/VBoxExtPackHelperApp'
    !=
  '/var/opt/VirtualBox/VBoxExtPackHelperApp'.

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: ExtPackManagerWrap
Interface: IExtPackManager {edba9d10-45d8-b440-1712-46ac0c9bc4c5}

The reason for this was I had created /opt as a symlink to /var/opt ( due to a lack of disc space in my root volume but lots of free space on my /var volume) and put the contents of /opt there. To date I’ve installed the following software to /var/opt via the /opt symlink without any problems:

  • ATLAS
  • CardPeek
  • cmark (C version of the CommonMark base code)
  • Daylight Chart
  • Firefox web browser
  • GNU Plot
  • Google Earth
  • Intellig IDEA
  • LibreOffice
  • Midnight Commander
  • Open Cryptoki
  • Pale Moon web browser
  • Perl 5.24 (compiled from source)
  • SCOWL (Spell Checker Oriented Word List)
  • WK HTML (Webkit HTML parser library)

Then this idiotic piece of crap blows up because /opt is a symlink and not a real directory!

So, I figured, all I had to do was tell VirtualBox to install to /var/opt, and that way any links it had would be happily pointing to a real dorectory and not to a symlink. But, no … the installer will install only to /opt. What an idiotic design! It forces the install to a single location, then breaks if said location is a symlink and not a real directory!

Fortunately I’m running a Logical Volume Manager (LVM) on penguin, and prudently left about 20 GB free on the volume group just in case I needed it. I allocated an 8 GB logical volume, mounted it on a temporary location, and copied the contents of /var/opt into it. I then deleted the /opt symlink, re-created it as a directory, and mounted the new LV over it. That fixed all the issues with VirtualBox, although I’m incredibly unimpressed with having to do that.