Cannot Install VirtualBox

I had VirtualBox installed when I installed OSX 10.11. It worked but had a few issues. So I decided to reinstall it then got this message…


"This package is Incompatible with this version of OS X and may fail to install."


Which it does.

Replies

There's a very good chance that this is because of SIP (System Integrity Protection) aka "rootless", which is a new feature in El Capitan.


If you need to install VirtualBox on 10.11, you can disable SIP by using the following command in Terminal:


sudo nvram boot-args="rootless=0"


or


holding cmd-r at bootup to get to Recovery HD. Then Utilities > Security Configuration menu. Uncheck Enforce System Integrity Protection and click Apply Configuration.


After rebooting you should be able to install VirtualBox on 10.11


You could also experiment to see if having SIP enabled after install is the cause of the issues you mention by re-enabling it by whichever method you used above (sudo nvram boot-args="rootless=1" for Terminal).

This is likely due to the package attempting to install CLI tools into /usr/bin - which is off-limits in 10.11 when SIP is enabled. Oracle will have to modify the installer to install the CLI tools into /usr/local/bin instead. You'll need to disable SIP for now.


Alternatively you could:


Extract the three individual PKGs from the main VBox installer and only install the resulting VirtualBox.pkg and VBoxKexts.pkg and then manually create the CLI snippets in /usr/local/bin - they're single-line bash scripts that call the actual binaries located inside the /Applications/Virtual Box.app bundle:


pkgutil --expand VirtualBox.pkg ~/Documents/VirtualBox
cd ~/Documents/VirtualBox
sudo installer -pkg VirtualBox.pkg -target /
sudo installer -pkg VBoxKexts.pkg -target /
echo '#!/bin/bash\nexec /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart "$@"' > /usr/local/bin/VBoxAutostart
echo '#!/bin/bash\nexec /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl "$@"' > /usr/local/bin/VBoxBalloonCtrl
echo '#!/bin/bash\nexec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$@"' > /usr/local/bin/VBoxHeadless
echo '#!/bin/bash\nexec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$@"' > /usr/local/bin/VBoxManage
echo '#!/bin/bash\nexec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$@"' > /usr/local/bin/VBoxVRDP
echo '#!/bin/bash\nexec /Applications/VirtualBox.app/Contents/MacOS/VirtualBox "$@"' > /usr/local/bin/VirtualBox
echo '#!/bin/bash\nexec /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv "$@"' > /usr/local/bin/vboxwebsrv


Source: https://gist.github.com/bruienne/439737f7d7ced48b8361


Boot from a different volume and install VBox to your 10.11 volume since SIP only protects the currently booted volume:


sudo installer -pkg VirtualBox.pkg -target /Volumes/MyElCapitanDisk


HTH,

Pepijn.

I actually went into the recovery partition and turned off SID there after finding what the issue might be. Disabling it allowed me to install VirtualBox.


I tried turning it back on using the terminal using "sudo nvram boot-args="rootless=1". It didn't ask for my password so I'm not sure if it worked.


Thanks for the reply.

You can check your nvram settings with the following command in Terminal:


nvram -p


the "sudo" command only requires your password if you haven't been prompted for it within the last few minuites.

I'm not seeing where SIP is mentioned but I can always turn it back on the way I turned it off.


thanks agsin.

I'm not looking to install VirtualBox myself, but I can appreciate a nice workaround!

Just a follow up, VirtualBox 4.3.28 (and I assume early versions) will install with or without SIP enabled.

VirtualBox 5.0 RC1 would install with SIP disabled in 10.11 Beta1.

Now, neither VirtualBox 5.0 RC1 nor RC2 will install even with SIP disabled in 10.11 Beta2.


Fun! lol

a quick update:

VirtualBox 5.0 (5.0.0-1011573-OSX) did install without issues on my El Capitan (15A226f) , even with SIP enabled. !

Good work for VirtualBox !

Hi,


Can you see USB devices inside Virtual machines through VirtualBox 5.0 on EL CAPITAN?

Hi,


Thinking about installing El Capitan.. Has this issue been solved ?

No. El Capitan is a disaster. Do not install. Wait until these bugs have been addressed, much less fixed. Seems Apple is in denial. Seriously. We are all crippled here. Taking everything into Icon tomorrow.