Feb 23, 2021 On the 'mysqlinstalldb' command, there needs to be a space between the 'whoami' and the '-basedir' - for me it was a cut&paste gotcha.Otherwise, this was a great help in removing a munged installation, because the filesystem locations seem to be different for each Mac OS and this is the only one I found for Mavericks that pointed me to /usr/local/var/mysql, where all the 'bad' stuff was hiding. Install MiKTeX on macOS. MiKTeX for Mac is distributed as a disk image (.dmg) file. If you double click the disk image file, you will see a Finder window: To install MiKTeX, simply drag the MiKTeX icon onto the Applications shortcut icon. This will install the MiKTeX Console application and essential support files (executables, frameworks. Homebrew is a package manager for MAC OS X. Using Homebrew you can directly download and install many open source software and unix tools. Again instead of downloading.dmg files and moving the applications you may use Homebrew Cask to install these applications.
Question or issue on macOS:
I did a clean install of High Sierra, Mac OS X 10.13 on my mac.
I’ve installed a few apps, some browsers, webStorm, vagrant, skype and slack.
When trying to install virtualBox I get an error message saying:
“The installation failed.
The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.”
When checking the installers log file I get the following error mesage:
I’ve googled this, and found a few threads here and there that solve different problems. But so far none has worked for me.
Some of the posts I’ve found:
https://www.virtualbox.org/ticket/15832
Error installing Virtualbox 5.1.10 on macOS Sierra, “The installation failed”
https://apple.stackexchange.com/questions/177868/virtualbox-4-3-26-on-osx-10-10-2-fails-to-install
Can’t unload kext while installing VirtualBox 4.3.6
None of these solutions worked for me.
I don’t have vmware installed, and have tried searching for the .match_kernel file to delete, but can’t find it anywhere. I don’t have the option of selecting a partition on disk utilities so can’t do a repair disk permissions on it.
I’ve installed and uninstalled different versions and cold booted in between to try to see if that would help.
Thanks for any help!
How to solve this problem?
Solution no. 1:
after hours of hacking at this issue my coworker and i came to a workable solution. the issue (for me at least) was that when i went to install the package it was getting blocked. you can check to see if this is the case by attempting to install, and when it says ‘install failed’ go to your security & privacy (in system preferences) and go to the ‘general’ tab and near the bottom it will say that an oracle application was blocked.
here are the steps we came up with **NOTE: if you tried downloading or installing this a few times like i did you will want to first uninstall virtualbox using the virtualbox uninstall tool which you can find in the downloaded .dmg file. you will also want to eject virtualbox from your devices (in the left panel of finder). after that go ahead and follow these instructions:
- Download VirtualBox 5.2 installer
- Run the DMG, this creates a device
- Attempt to install from .pkg file, it will fail at the validation step
- Close installer and run the uninstaller.tool file. DO NOT DELETE THE INSTALLER DEVICE
- Go to System Preferences -> Security and Privacy -> General and approve the blocked software from ‘Oracle America’
- Run the install from the same .pkg file, it should now complete successfully
Solution no. 2:
I finally managed to solve it with a suggestion from here: https://github.com/caskroom/homebrew-cask/issues/39369#issuecomment-339118861
Run this script:
Run this script after you attempt to install virtualbox. Keep approving the kexts until the script runs cleanly:
Run brew cask reinstall --force virtualbox
Kudos to Dan Stroot for the solution.
Solution no. 3:
Solution so far:
Ok, this is a bit of a hassle but we did manage to make it kind of work.
Cleanup Dmg Files Installed By Brew Plus
The issue is related to the system not deleting all files from the virtual box installation.
Using the terminal to search for files with virtualbox in the name of the file, we found (non vagrant related) files that were still in the system.
Problem is these files cannot be deleted even using sudo. So we had to reboot the system pressing cmd + r so you go into a troubleshooting system and not the normal OS environment. In there, you can open the terminal and run “csrutil disable”, then reboot the system.
This turns off System Integrity Protection for your system so it is NOT RECOMMENDED, but we had to do this in order to delete these files that we couldn’t delete before.
So after deleting these files, we ran the install again and now it worked! Immediately afterwards I tried running vagrant and now it worked as expected.
My final problem now: after making sure that vagrant is working, I went back to starting the computer again pressing cmd + r, open the terminal and run “csrutil enable” and reboot.
Back in the normal OS X I try to run vagrant and get an error again. So at the moment I had to go back again, to disable the csrutil, which is NOT RECOMMENDED, but it’s as of this moment the only thing that works for me.
I have not tried running all these steps again.
Solution no. 4:
The answer from llene works perfect for me. The key is that, when you already tried to install and not succeed, you have to do exactly this steps:
- Run VirtualBox installer
- Run install from .pkg file, it will fail at the validation step, it’s ok
- close installer and run it again, but now choose uninstaller.tool file, inside (DO NOT DELETE THE INSTALLER DEVICE yet)
- eject virtualbox from your devices (in the left panel of finder)
- After, go to System Preferences -> Security and Privacy -> General and approve the blocked software from ‘Oracle America’, that will appear there
6) Run install again from the same .pkg file. Now it should complete successfully
Solution no. 5:
Managed to solve it.
Eject the VirtualBox image from: Finder > Devices
Remove VirtualBox device
Now allow the exception in: System Preferences > Security & Privacy
Then try to install from the .dmg again so that it remounts the device.
Now its working fine for me.
Cleanup Dmg Files Installed By Brew 2
Solution no. 6:
Cleanup Dmg Files Installed By Brew N
For those using homebrew, run ‘brew install caskroom/cask/virtualbox’, which will fail the first time. Then go to System Preferences>Security & Privacy>General as described above, where, at the bottom, there should be a message about the software install being blocked. Click the ‘Allow’ button next to this message, then go back to your terminal. Run the homebrew command again and this time it will work.
Solution no. 7:
So.. after struggling a lot about this, and after spend a lot of time in stack overflow.. I combined some answers and finnaly get to install virtualbox in my 10.13 osx.
So:
As I read, Sierra has a new security feature that blocks some external programs. During virtualbox installations you can check Preferences > Security & Privacy > General. You will see that Oracle (virtualbox) is being blocked.
So, what I did was:
Run this command at terminal to disable that new sierra gatekeeper:
sudo spctl --master-disableOpen the virtualbox install program, and click unistall to make sure there is no trace of the previous installation attempts.
- In the desktop, or in the finder left sidebar (in devices) if there is any virtualbox image, you have to eject them.
- Delete the previous virtualbox program and download a new one.
- Now, if these steps work for you as they worked for me, you will be able to install virtualbox.
(After this you can re-enable the gatekeeper feature running sudo spctl --master-enable
Cleanup Dmg Files Installed By Brew
Solution no. 8:

When running the excellent Disk Arbitrator app, Deactivate it — when active it blocks all mounts and optionally remounts them read-only
which, e.g., prevents Spotlight from trashing USB drives but (d-uh)
gotta remember to turn it off when appropriate.
Hope this helps!
| # brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup |
| Already up-to-date. |
| Error: brew-cask-0.49.0 already installed |
| # brew cask install screenhero |
| > Downloading http://dl.screenhero.com/update/screenhero/Screenhero.dmg |
| Already downloaded: /Library/Caches/Homebrew/screenhero-latest.dmg |
| Error: undefined method `extname' for nil:NilClass |
| Please report this bug: |
| https://github.com/caskroom/homebrew-cask/issues |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/container/criteria.rb:43:in `extension' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/container/pkg.rb:3:in `me?' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/container.rb:50:in `block in for_path' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/container.rb:48:in `each' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/container.rb:48:in `find' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/container.rb:48:in `for_path' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/installer.rb:85:in `extract_primary_container' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/installer.rb:52:in `install' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/cli/install.rb:20:in `block in install_casks' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/cli/install.rb:17:in `each' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/cli/install.rb:17:in `install_casks' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/cli/install.rb:6:in `run' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/cli.rb:81:in `run_command' |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib/cask/cli.rb:121:in `process' |
| /usr/local/bin/brew-cask.rb:42:in `<top (required)>' |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' |
| /usr/local/Library/brew.rb:59:in `require?' |
| /usr/local/Library/brew.rb:142:in `<main>' |
| # brew cask doctor |
| > OS X Version: |
| 10.10.1 |
| > Hardware Architecture: |
| intel-64 |
| > Ruby Version: |
| 2.0.0-p481 |
| > Ruby Path: |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby |
| > Homebrew Version: |
| 0.9.5 |
| > Homebrew Executable Path: |
| /usr/local/bin/brew |
| > Homebrew Cellar Path: |
| /usr/local/Cellar |
| > Homebrew Repository Path: |
| /usr/local |
| > Homebrew Origin: |
| https://github.com/Homebrew/homebrew |
| > Homebrew-cask Version: |
| 0.49.0 |
| > Homebrew-cask Install Location: |
| /usr/local/Cellar/brew-cask/0.49.0 |
| > Homebrew-cask Staging Location: |
| /opt/homebrew-cask/Caskroom |
| > Homebrew-cask Cached Downloads: |
| /Library/Caches/Homebrew |
| /Library/Caches/Homebrew/Casks |
| 0 files |
| 0.00 megs |
| > Homebrew-cask Default Tap Path: |
| /usr/local/Library/Taps/caskroom/homebrew-cask |
| > Homebrew-cask Alternate Cask Taps: |
| /usr/local/Library/Taps/caskroom/homebrew-versions |
| > Homebrew-cask Default Tap Cask Count: |
| 2155 |
| > Contents of $LOAD_PATH: |
| /usr/local/Cellar/brew-cask/0.49.0/rubylib |
| /usr/local/Library/Homebrew |
| /Library/Ruby/Site/2.0.0 |
| /Library/Ruby/Site/2.0.0/x86_64-darwin14 |
| /Library/Ruby/Site/2.0.0/universal-darwin14 |
| /Library/Ruby/Site |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0 |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin14 |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin14 |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0 |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin14 |
| /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14 |
| > Contents of $RUBYLIB Environment Variable: |
| <NONE> |
| > Contents of $RUBYOPT Environment Variable: |
| <NONE> |
| > Contents of $RUBYPATH Environment Variable: |
| <NONE> |
| > Contents of $RBENV_VERSION Environment Variable: |
| <NONE> |
| > Contents of $CHRUBY_VERSION Environment Variable: |
| <NONE> |
| > Contents of $GEM_HOME Environment Variable: |
| <NONE> |
| > Contents of $GEM_PATH Environment Variable: |
| <NONE> |
| > Contents of $BUNDLE_PATH Environment Variable: |
| <NONE> |
| > Contents of $PATH Environment Variable: |
| PATH='/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin' |
| > Contents of $SHELL Environment Variable: |
| SHELL='/bin/bash' |
| > Contents of Locale Environment Variables: |
| LC_CTYPE='en_US.UTF-8' |
| > Running As Privileged User: |
| No |