[FIX] VirtualBox The Installation Failed on Mac

The popularity of virtual machines grows day by day and for good reason. Having the ability to use a completely different system on top of your existing is something that the common folk wouldn’t even imagine a while back. VirtualBox is one of the most famous hypervisors out there which is available for all the different platforms. In some cases, however, the installation procedure may not go as expected. As it turns out, some users face the “The installation failed” error message while trying to install VirtualBox on their Mac system.

VirtualBox The Installation Failed

This error message appears because the certificate that the installer is using is not being allowed by the macOS. The VirtualBox installer is actually signed using the Oracle America certificate which needs to be allowed in order for the installer to proceed with the installation. In this case, however, since the certificate is being blocked, the installer throws the said error message as a result.

Now, there are quite a few workarounds to this problem. The first would be to just simply allow the certificate from the security and privacy settings. However, there are some issues with doing that if you are remotely connected to the system. Nonetheless, we will go through all the possible scenarios and provide a workaround. So, without further ado, let us get started.

Method 1: Allow the Certificate

The first thing that you should do when you face the said error message is to allow the certificate from the system preferences. As it turns out, the certificate isn’t allowed by default and thus awaits approval under Security and Privacy in the System Preferences. Therefore, you will have to do allow it from there. However, it is important to note that if you are remotely connected to the system, this might not work for you. Therefore, we have other workarounds that you can use to fix the issue. With that said, follow the instructions down below to resolve the issue:

  1. First of all, you will have to eject the Virtual image. This can be done by opening up the Finder. There, you should be able to see the VirtualBox option under Devices.
    VirtualBox Image
  2. Eject the device from there.
  3. Once you have done that, open up the System Preferences.
  4. On the System Preferences screen, go to the Security & Privacy option.
  5. Now, under the General tab, you should be able to see “System software from Oracle America was blocked from loading“.
    Allowing Oracle Certificate
  6. Click on the Allow button in front of it to allow this.
  7. After that, try to install VirtualBox again. Doing so will automatically mount the device again so you don’t have to worry about that.

Method 2: Allow Unidentified Developer Apps

Another way you can fix the said error message is to allow unidentified developer apps on your Mac. What this will do is it will essentially allow applications from unidentified developers to be opened. Now, this isn’t something that you should do normally but in this case, it can be an exception. It is also important to note that you will have to disable this once you have installed VirtualBox on your system. Follow the instructions down below to do so:

  1. First of all, close the System Preferences screen if it is opened.
  2. After that, go to Go on your Finder and then from the drop-down menu, select Utilities.
  3. From there, open up the Terminal.
    Opening Terminal
  4. In the terminal window, enter the sudo spctl –master-disable command.
  5. You will be prompted for your admin password. Provide the password and then exit the terminal window once the command has executed.
  6. After that, open up the System Preferences window.
  7. On System Preferences, go to Security and Privacy.
  8. Then, at the bottom of the window, click on the lock icon.
    System Preferences
  9. You will be asked for your admin password, enter it.
  10. Then, under Allow apps downloaded from, choose the Anywhere option.
  11. Finally, click the clock again to save the changes.
  12. Now, run the VirtualBox installer and see if it resolves the issue.

Once you have successfully installed VirtualBox, you will have to disable this setting. To do this, follow the instructions below:

  1. Close the System Preferences window and open up a Terminal.
  2. In there, type sudo spctl –master-enable and then hit Enter.
    Enabling SPCTL
  3. Provide your admin password and wait for the command to be executed.
  4. Finally, close your terminal window.
  5. That should restore the changes to normal.

Method 3: Execute a Script

As we have mentioned before, for some people, clicking the Allow button in the first method might not work. This especially happens to those who are not locally present in front of their Mac and are remotely connected/sharing a screen. In such a case, what you can do is execute a script that tells the Mac to click the Allow button. In order for this to work, you have to make sure you do not move the Security and Privacy window. This is really important. With that said, follow the steps down below to create and execute the script:

  1. First of all, run the VirtualBox installer until you are asked for a location.
  2. Then, open up System Preferences and go to Security & Privacy.
  3. Here, you will have to bring up the screenshot tool and find the coordinates of the Accept button. To do this, press CMD + SHIFT + 4 button and then, hover over the Accept button. Note down the values.
    Taking Screenshot
  4. Finally, open up Script Editor and paste the following:
    tell application "System Events" to click at {x,y}
  5. Here, x and y are the coordinates so replace them accordingly.
  6. Finally, run the command. This will press the Allow button and now you should be able to install VirtualBox.

Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.