37

I am unable to install virtualbox on macOS Catalina. Tried both the GUI installer and Homebrew.

Here is the installation error:

installer: The upgrade failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An error occurred while running scripts from the package “VirtualBox.pkg”.)

Is anyone else facing this issue? Any way to get around this?

Here's the output from install.log:

2019-10-14 21:35:29+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: ----- Begin install -----
2019-10-14 21:35:29+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: request=PKInstallRequest <4 packages, destination=/>
2019-10-14 21:35:29+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: packages=(
        "PKLeopardPackage <id=org.virtualbox.pkg.vboxkexts, version=6.0.12, url=file:///Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg>",
        "PKLeopardPackage <id=org.virtualbox.pkg.virtualbox, version=6.0.12, url=file:///Volumes/VirtualBox/VirtualBox.pkg#VirtualBox.pkg>",
        "PKLeopardPackage <id=org.virtualbox.pkg.virtualboxcli, version=6.0.12, url=file:///Volumes/VirtualBox/VirtualBox.pkg#VirtualBoxCLI.pkg>",
        "PKLeopardPackage <id=com.github.osxfuse.pkg.Core, version=3.9.0, url=file:///Volumes/VirtualBox/VirtualBox.pkg#OSXFuseCore.pkg>"
    )
2019-10-14 21:35:29+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Set reponsibility for install to 59047
2019-10-14 21:35:29+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Extracting file:///Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/FA51811A-A5EE-438F-AB97-30B707A37E84.activeSandbox/Root/Library/Application Support/VirtualBox, uid=0)
2019-10-14 21:35:35+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Extracting file:///Volumes/VirtualBox/VirtualBox.pkg#VirtualBox.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/FA51811A-A5EE-438F-AB97-30B707A37E84.activeSandbox/Root/Applications, uid=0)
2019-10-14 21:35:36+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Extracting file:///Volumes/VirtualBox/VirtualBox.pkg#VirtualBoxCLI.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/FA51811A-A5EE-438F-AB97-30B707A37E84.activeSandbox/Root/usr/local/bin, uid=0)
2019-10-14 21:35:36+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Extracting file:///Volumes/VirtualBox/VirtualBox.pkg#OSXFuseCore.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/FA51811A-A5EE-438F-AB97-30B707A37E84.activeSandbox/Root, uid=0)
2019-10-14 21:35:36+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: prevent user idle system sleep
2019-10-14 21:35:36+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: suspending backupd
2019-10-14 21:35:36+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Executing script "./preflight" in /private/tmp/PKInstallSandbox.gnJCJ0/Scripts/org.virtualbox.pkg.virtualbox.rti5CB
2019-10-14 21:35:36+05:30 Anshs-MacBook-Pro install_monitor[59061]: Temporarily excluding: /Applications, /Library, /System, /bin, /private, /sbin, /usr
2019-10-14 21:35:36+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Executing script "./preinstall" in /private/tmp/PKInstallSandbox.gnJCJ0/Scripts/com.github.osxfuse.pkg.Core.9YnwPG
2019-10-14 21:35:37+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Using trashcan path /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/PKInstallSandboxTrash/FA51811A-A5EE-438F-AB97-30B707A37E84.sandboxTrash for sandbox /Library/InstallerSandboxes/.PKInstallSandboxManager/FA51811A-A5EE-438F-AB97-30B707A37E84.activeSandbox
2019-10-14 21:35:37+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Shoving /Library/InstallerSandboxes/.PKInstallSandboxManager/FA51811A-A5EE-438F-AB97-30B707A37E84.activeSandbox/Root (3 items) to /
2019-10-14 21:35:37+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Executing script "./postflight" in /private/tmp/PKInstallSandbox.gnJCJ0/Scripts/org.virtualbox.pkg.vboxkexts.y8lJQi
2019-10-14 21:35:37+05:30 Anshs-MacBook-Pro installd[554]: ./postflight: /Library/LaunchDaemons/org.virtualbox.startup.plist
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro installd[554]: ./postflight: /Library/Application Support/VirtualBox/VBoxDrv.kext failed to load - (libkern/kext) system policy prevents loading; check the system/kernel logs for errors or try kextutil(8).
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro install_monitor[59061]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: releasing backupd
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: allow user idle system sleep
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Cleared responsibility for install from 59047.
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Cleared permissions on Installer.app
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “VirtualBox.pkg”." UserInfo={NSFilePath=./postflight, NSURL=file:///Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg, PKInstallPackageIdentifier=org.virtualbox.pkg.vboxkexts, NSLocalizedDescription=An error occurred while running scripts from the package “VirtualBox.pkg”.} {
        NSFilePath = "./postflight";
        NSLocalizedDescription = "An error occurred while running scripts from the package \U201cVirtualBox.pkg\U201d.";
        NSURL = "file:///Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg";
        PKInstallPackageIdentifier = "org.virtualbox.pkg.vboxkexts";
    }
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Running idle tasks
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro Installer[59047]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “VirtualBox.pkg”." UserInfo={NSFilePath=./postflight, NSURL=file:///Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg, PKInstallPackageIdentifier=org.virtualbox.pkg.vboxkexts, NSLocalizedDescription=An error occurred while running scripts from the package “VirtualBox.pkg”.}
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Removing client PKInstallDaemonClient pid=59047, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer)
2019-10-14 21:35:38+05:30 Anshs-MacBook-Pro installd[554]: PackageKit: Done with sandbox removals
2019-10-14 21:35:39+05:30 Anshs-MacBook-Pro Installer[59047]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
2019-10-14 21:35:39+05:30 Anshs-MacBook-Pro Installer[59047]: IFDInstallController 29385C0 state = 8
2019-10-14 21:35:39+05:30 Anshs-MacBook-Pro Installer[59047]: Displaying 'Install Failed' UI.
2019-10-14 21:35:39+05:30 Anshs-MacBook-Pro Installer[59047]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.

Here's what happens if I try to create a VM even after the failed installation:

enter image description here

1
  • 1
    What version of VirtualBox are you trying? According to this bug report "The latest release VirtualBox 6.0.12 and 10.15 don't play nice. You can either get the latest test build (after disabling SIP) which addresses the issue, or wait until 6.0.14 gets released on 2019-10-15."
    – lx07
    Oct 14, 2019 at 13:37

4 Answers 4

55

To install and/or use virtualbox you may need to enable its kernel extension in: System Preferences → Security & Privacy → General

For more information please refer the documentation or this Apple Technical Note: https://developer.apple.com/library/content/technotes/tn2459/_index.html

4
  • 10
    What's particularly annoying is that there's a popup from macOS to go look in that part of System Preferences the first time you install VirtualBox, but not on subsequent uninstall-reinstall cycles, which means if you forget how this works your only hope is this SO answer Jan 21, 2020 at 1:30
  • For Cataliina, see this tech note: support.apple.com/guide/mac-help/…
    – pferrel
    Jan 29, 2020 at 23:50
  • 6
    The General tab has nothing relevant to enabling kernel extensions. Please say more. Apr 21, 2020 at 19:28
  • 1
    @SamanthaAtkins I thought the same at first too, but look near the bottom, it's greyed out, you need to first click the lock to unlock the preference panel to approve it.
    – deweydb
    Jun 15, 2020 at 3:43
11

If you've used Migration Assistant

I'd moved from an old machine running macOS Mojave to a new machine using macOS Catalina using Migration Assistant. This bypassed the normal installation process, so the Security & Privacy System Preference never displayed a prompt that would allow me to grant VirtualBox permission to run.

The solution was to download the latest, Catalina-compatable VirtualBox installer .dmg (version 6.12 and up) and run VirtualBox_Uninstall.tool. This failed, but prompted for extra permissions in System Preferences... Security & Privacy. After I granted permission to the uninstall tool, I ran the Uninstall tool again successfully.

I then ran the VirutalBox install .pkg, which will failed. VirtualBox did install, just not completely. I then launched VirtualBox, which failed, but gave me a prompt in System Preferences... Security & Privacy that allowed me to grant permission for VirtualBox to run. I then launched VirtualBox again, and was good to go.

2
  • 1
    this was exactly my case and it worked, thank you sir.
    – Szundi
    Dec 10, 2019 at 23:18
  • Best, answer ever. The main point is VirtualBox_Uninstall.tool
    – noomz
    Mar 8, 2020 at 6:24
6

For Catalina you'll need to do this:

Restart your mac in Recovery mode (cmd + R)

Then open a Terminal and enter: spctl kext-consent add VB5E2TV963

Restart your mac.

VB5E2TV963 is the code for oracle.

(Taken from https://forums.virtualbox.org/viewtopic.php?f=8&t=93133 )

For me was the only way to install it.

2
  • This is gold, last update destroyed my Vagrant + VirtualBox setup. Neither this answer: To install and/or use virtualbox you may need to enable its kernel extension in: System Preferences → Security & Privacy → General Nor sudo spctl --master-disable helped this time. Mar 22, 2021 at 13:29
  • I'm on Mojave -- this was the only answer that worked for me
    – dwib
    Aug 11, 2021 at 22:56
3

This is what worked for me: Do what is described here:

https://www.imore.com/how-open-apps-anywhere-macos-catalina-and-mojave

After having done this, you see the information that installing a module by Oracle failed. You can grant permission and do a new install. This time it works.

1
  • 1
    This was the only solution which worked for me. Thanks
    – dszakal
    May 20, 2020 at 15:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .