Tip for failed installation of VirtualBox on MacBook
If you fail to install VirtualBox on MacBook and you don’t get the
Allow button as expected - according to what is suggested in some StackOverflow answers about it - run Homebrew command
brew install homebrew/cask/virtualbox so the missing button will appear and clicking it will solve your problem.
When installing VirtualBox on MacBook using the .dmg package, the installer shows this error:
The suggested solution
There are several StackOverflow answers about it (e.g. https://stackoverflow.com/questions/46546192/virtualbox-not-installing-on-high-sierra) that suggest to go to the
System Preferences - Security & privacy page and click the
Allow button that appears there for
Oracle America, as in the below image, and this will solve the problem.
This is a great solution, but what if the button is not there????
The working solution
If the above solution is not working for you, you should overcome it by running the Homebrew command
brew install homebrew/cask/virtualbox (which installs VirtualBox as well, but also includes its dependecies) which will cause the missing
Allow button to appear. Clicking it will help the installation to pass OK.