Short tip: VirtualBox 5.2 installation under macOS 10.13

VirtualBox enjoys great popularity where it is required to virtualize common operating systems for conventional use-cases at no cost. In comparison with other hypervisors such as VMware Workstation, VirtualBox only offers basic graphics acceleration - which is sufficient for classic desktop applications.

During a recent installation under macOS 10.13 I had problems installing the software. Der appropriate assistant always crashed with the following error message:

The installation failed. The installed encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.

Error message during installation of Oracle VirtualBox under macOS 10.13

After clicking System settings > Security I saw that the request to install a kernel extension (which is required for VirtualBox to establish network connections) was dropped. On the other hand, acknowledging the request did not help.

After some tests, the only solution for me was to temporarily disable the appropriate security feature. For this, execute the following commands:

1$ sudo spctl --master-disable
2$ sudo spctl --status
3assessments disabled

It is important that disabling the protection is acknowledged. If this is not working, rebooting the Mac might help.

Afterwards, you should see a new setting "Anywhere" in the security settings dialog:

Security settings under macOS

After selecting this setting, running the installation was working fine for me.

Afterwards it is important, to reset the security setting to the former value and also re-enable the protection:

1$ sudo spctl --master-enable
2$ sudo spctl --status
3assessments enabled

Translations: