When I install VirtualBox on macOS, I meet an error message like this The installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. I struggled for some time and finally find the solution to fix it. Now let me tell you.
1. How To Enable VirtualBox To Be Installed On macOS.
- To fix this issue is not hard, you just need to follow the below steps.
- Click the Apple menu ( ) at the top left menu bar.
- Then click the System Preferences menu item in the popup menu lists.
- Click Security & Privacy icon, then click the General tab.
- You can see there is a message ( System software from developer “Oracle America, Inc.” was blocked from loading ) is displayed at the bottom of the window.
- Click the Allow button to make the message disappear, now install the VirtualBox again, it will be successful.
2. Install MacOS Application From Both App Store & Identified Developers.
- By default, your macOS only allow installing macOS app from App Store.
- But you have the choice to install the macOS app from identified developers, please follow the below steps.
- Open Security & Privacy window as described in section 1.
- Click the little lock icon at the window bottom-left corner to unlock the settings, you need to provide the administrator password.
- Select App Store and identified developers radio button in the section Allow apps downloaded from.
- Click the little lock to save the changes.
- Now you can install macOS apps downloaded from both App Store & identified developers.
3. Question & Answer.
3.1 Failed To Install VirtualBox On Catalina.
- I just reinstalled Catalina on my MacBook pro. And when I install the VirtualBox, it pops up a dialog that said “The installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.”
- So I open the VirtualBox installation log file in the path /var/log/install.log and get the below log data. Can anyone give me some help? Thanks.
Nov 29 15:16:36 jerry-macbook installd[519]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 “An error occurred while running scripts from the package “VirtualBox.pkg”.” UserInfo={NSFilePath=./postflight, NSURL=file://localhost/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.pkgU201d.”; NSURL = “file://localhost/Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg”; PKInstallPackageIdentifier = “org.virtualbox.pkg.vboxkexts”; }
- Do you check whether the VirtualBox you installed has been blocked by the macOS system or not? You can follow this article to check the System Preferences —> Security & Privacy —> General tab. You can follow the below steps to install the VirtualBox again.
1. Download the latest version of VirtualBox.
2. Click the downloaded dmg to run it, then it will mount a device.
3. Click the .pkg file to install VirtualBox, if this is the first time you install it, it will fail when it comes to the validation wizard.
4. Close the VirtualBox installer and click the file uninstaller.tool to uninstall the installed VirtualBox.
5. Remain the mounted installer device, do not remove it.
6. Now you can go to the System Preferences —> Security & Privacy —> General tab to allow to install the blocked VirtualBox from ‘Oracle America’.
7. Now run the VirtualBox installer again, it will install it correctly.
3.2 Answer To The comments-95247
- The macOS that is newer than High Sierra has a gatekeeper feature. This feature will block any apps that do not sign with the mac identified developer id.
- So if you meet such an error when installing VirtualBox, you can go to the System Preferences —> Security & Privacy —> General to see whether macOS block the VirtualBox installation or not.
- If you see an Allow button, that means macOS has blocked the VirtualBox installation, you can click the Allow button to install it.
- If you do not see anything, you can first run the command sudo spctl –master-disable in the terminal, this will allow you to install VirtualBox which is developed without an identified developer id.
- This will also add a radio choice Anywhere in the System Preferences —> Security & Privacy —> General tab, now the macOS will allow installing apps downloaded from anywhere.
- Then you should uninstall VirtualBox entirely to make sure no VirtualBox installation files are left on your macOS, and eject the mounted VirtualBox image.
- Download the newest version of the VirtualBox installer and install it. Now the error will disappear.
- After that, if you want to make your mac safer, you had better run the command sudo spctl –master-enable to enable the gatekeeper.
References
I install VirtualBox on my iMac, but it failed at the end. The log file shows the below error. Then I uninstall the VirtualBox with the uninstall.tool which exist in the VirtualBox package and reinstall it, but the error still exist. How can I fix it.
Jun 03 06:29:26 MyiMac installd[61695]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 “An error occurred while running scripts from the package “VirtualBox.pkg”.” UserInfo=0x7f90d0471f40 {NSFilePath=./postflight, NSURL=file://localhost/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://localhost/Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg”;
PKInstallPackageIdentifier = “org.virtualbox.pkg.vboxkexts”;
}
Please see the article Question & Answer section 3.2. I explained how to fix such an error there.
I did alll but it fails to install again