114

I have tried to install VirtualBox 5.1.28 to macOS high sierra but it fails every time with the following screen: Virtual Box Installation Failure

After some looking around I found this thread and I did indeed see that it was blocking VirtualBox from installing.

Security and Privacy settings

After clicking allow and then trying to run the VirtualBox installer again it just fails again with the same generic error message and the same Security warning reappears in the "Security and Privacy" settings.

I tried to also run the pkg install from the terminal to see if I could get more information about why its failing but it doesnt help.

➜  Documents sudo installer -verbose -pkg VirtualBox.pkg -target /
installer: Package name is Oracle VM VirtualBox
installer: Installing at base path /
installer: Preparing for installation….....
installer: Preparing the disk….....
installer: Preparing Oracle VM VirtualBox….....
installer: Waiting for other installations to complete….....
installer: Configuring the installation….....
installer:
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Optimizing system for installed software….....
#
installer: Running package scripts….....
#
installer: Running package scripts….....
#
installer: Running package scripts….....
#
installer: Running package scripts….....
#
installer: Running package scripts….....
#
installer: Running package scripts….....
installer: Validating packages….....
#
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)

The VirtualBox application does appear to install and it can be launched however nothing functions.

Does anyone have any ideas how to solve this?

6 Answers 6

142

Managed to solve it.

  • Eject the VirtualBox image from: Finder > Devices

    Remove VirtualBox device

  • Now allow the exception in: System Preferences > Security & Privacy

    Security & Privacy

  • Finally but not least click Allow button so that way the developer with the name "Oracle America, Inc" will be accepted and the installer using that certificate will run just fine (basically this installer is signed using "Oracle America, Inc" certificate so we are required to enable it use on our machine first)

  • Then try to install from the .dmg again so that it remounts the device.

Now its working fine for me.

8
  • 1
    Awesome. Good thing to know.
    – pierrea
    Commented Dec 8, 2017 at 19:03
  • 3
    I'm using MacOS 10.13.1 (High Sierra), and I didn't see the option to "Allow". I followed the steps at this link: osxdaily.com/2016/09/27/… (basically, I ran sudo spctl --master-disable) and the option appeared. However, the option didn't work - Each time I ran the installer, I got an "Allow" option. The "Allow" wasn't being remembered for some reason...
    – jrharshath
    Commented Jan 16, 2018 at 14:29
  • 1
    Thank you! Worked like a charm in High Sierra 10.13.2 and Vbox 5.2.6
    – Rho
    Commented Jan 17, 2018 at 16:24
  • 2
    I had issues with this not allowing me to click "Allow" when I first tried it. A full reboot of the Mac fixed it up and then the install was fine.
    – jocull
    Commented Jun 7, 2018 at 23:29
  • 2
    This helped me to install Virtualbox on Mojave github.com/Homebrew/homebrew-cask/issues/51112
    – vikas027
    Commented Nov 3, 2018 at 10:30
8

For those still struggling with this issue:

IF YOU ARE CONNECTING VIA REMOTE DESKTOP OR SCREEN SHARING or have any other mouse emulation running: It is not possible to actually click the Allow button in this mode!!

So do the following:

  1. Run the installer until the location prompt
  2. open System Preferences
  3. Take a screenshot (CMD+SHIFT+3)
  4. Open the screenshot with Preview, and select from top left to the button, and note down the coordinates
  5. Then open Script Editor, and run the following line of code: tell application "System Events" to click at {890, 460} Use the coordinates from step 4. and make sure you don't move the Preferences window, and that no other window is overlaying the button. (It could be you need to give Script Editor Accessibility permission, but it will prompt you)

Now the button is actually clicked, and you can allow "Oracle America, Inc." to install. You might be prompted for a reboot. Then run the installer again and everything should work as expected!

3
  • 1
    I just ran into this the other day with Mac OS X 10.13.6 (17G65). I was VNC-ing into my local server and couldn't press the "Allow" button, I had to connect a Bluetooth keyboard or mouse to it in order for it to be allowed.
    – TJ Luoma
    Commented Sep 26, 2018 at 17:28
  • Wow, what an annoying bug/feature, thanks for saving me continuing to bang my head against the wall trying to install VirtualBox remotely . . . . Commented Apr 17, 2019 at 12:39
  • I can't believe this worked haha. I'm not on remote desktop, so I wonder what's triggering this.
    – flackend
    Commented Sep 11, 2019 at 19:13
6

The answer at the following link worked for me. It required running the script provided by dstroot, approving the kext in Security & Privacy and then installing with brew cask reinstall --force virtualbox --verbose --debug. https://github.com/caskroom/homebrew-cask/issues/39369

1
  • This solved my problem!
    – johnbaltis
    Commented Mar 4, 2020 at 13:18
5

If the GUI solution does not work, reboot in Recovery mode and enter spctl kext-consent add VB5E2TV963, then reboot in normal mode and install should be ok.

3
  • Thank you very much, Liviu Ionescu. The command line solution you provided, after having changed Security Preferences, was the only solution that worked for me!
    – lino
    Commented Mar 30, 2018 at 2:56
  • This doesn't work for my, throws error in both normal and safe mode
    – TheNano
    Commented Jul 17, 2018 at 8:14
  • @TheNano, what macOS version do you use? And what errors did you see? Commented Jul 18, 2018 at 18:32
5

For some reason when I clicked "allow" it felt as if the button "did nothing" but then when I tried it a third time the button "took" (after which point it always worked). Weird.

More ideas:

reboot into safe mode, try the allow button there

command line: sudo spctl --master-disable

This is a community wiki feel free to add some more ideas here.

3
  • Please, which button are you talking of?
    – athena
    Commented May 1, 2018 at 15:24
  • 2
    The "allow" button in the Security and Privacy preference pane
    – rogerdpack
    Commented May 1, 2018 at 19:40
  • 1
    It looks like you may have to wait a period of time with the preference pane displayed before the "allow" button actually functions.
    – Steve-o
    Commented Jul 1, 2018 at 18:04
2

I saw a quick note in one of the messages here or in another thread and it was the critical piece I was missing.

When I had the Security & Privacy dialog open, the Apply button visible and clicking on the button and there was no apparent action. The prompt still remained. I needed to WAIT longer before trying the Apply. I found I waited 20 minutes until the button actually worked (the prompt went away).

1
  • This worked for me too; I waited about 5 min and then I could press the Allow button Commented Aug 20, 2018 at 14:24

You must log in to answer this question.

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