Page 2 of 2

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 8. Oct 2017, 18:44
by loukingjr
You're welcome.

VB 5.1.28 installation fails on 10.13 OS X

Posted: 9. Oct 2017, 01:05
by nonprofitSA
Hi, there I am still having installation issues despite having allowed it in security and privacy in system preferences.
The installer log is attached.

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 9. Oct 2017, 01:48
by socratis
@nonprofitSA
I didn't see the particular need to have a new topic which covers exactly the same problem you had before, therefore I merged your new topic with the existing one. And no, a different version of VirtualBox is not a different problem at this point. The problem at this point is 10.13, not VirtualBox.

Did it ever occur to you to mention that you're not actually on 10.13, but on 10.13.1beta?
Oct  8 19:02:53 Andrews-MBP Installer[5244]: Running OS Build: Mac OS X 10.13.1 (17B25c)
You're getting the standard error due to the TeamID (Oracle, VirtualBox) not being authorized to install any kext on your system. Read the article from Apple that's been linked more times than I care to count. Take the appropriate action.
Oct  8 19:03:10 Andrews-MBP installd[731]: ./postflight: /Library/Application Support/VirtualBox/VBoxNetFlt.kext
                failed to load - (libkern/kext) system policy prevents loading; check the system/kernel logs for
                errors or try kextutil(8).

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 20. Nov 2017, 05:59
by mystic
Hi have just migrated all of my apps, data and accounts from a 2011 MacBook Pro running 10.13.1 where VB ran fine to a new MBP running 10.13.1 and my installation of VB fails. I have followed the instructions to Allow Oracle in the security & Privacy but keep getting the same error message in VB installation and the block message reappears.

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 21. Nov 2017, 18:06
by socratis
@mystic
It seems that no one knows at this point what's the problem with Apple's installer policy. They (Apple) seem to be trying to figure it out as well.

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 29. Nov 2017, 23:05
by jbz
I was experiencing the same issue, under 10.13.1 (17B1002), in that installation failed despite granting permission in System Preferences → Security. The solution was to execute the last lines of the kext postflight script manually and with sudo:

Code: Select all

sudo kextload '/Library/Application Support/VirtualBox/VBoxDrv.kext'
sudo kextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext'  '/Library/Application Support/VirtualBox/VBoxUSB.kext'
sudo kextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext'  '/Library/Application Support/VirtualBox/VBoxNetFlt.kext'
sudo kextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext'  '/Library/Application Support/VirtualBox/VBoxNetAdp.kext'

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 29. Nov 2017, 23:30
by socratis
jbz wrote:The solution was to execute the last lines of the kext postflight script manually and with sudo
Did you try rebooting the system? That would have the same effect.

Plus, you're a little bit off-topic here, because the problem of the thread is that people were having issues getting VirtualBox installed, not started. But it's OK ;)

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 29. Nov 2017, 23:58
by jbz
@socratis, Not sure I understand. My issue was exactly as reported by others: the installer would fail with message

Code: Select all

2017-11-29 21:45:14+01 JBZs-MBP installd[495]: 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.pkg\U201d.";
	    NSURL = "file://localhost/Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg";
	    PKInstallPackageIdentifier = "org.virtualbox.pkg.vboxkexts";
	}
despite allowing Oracle to install kexts in Sys Pref. That "Allow" button would simply just appear again.

Now I did not try to restart the system, but I don't remember having seen this as a suggested solution. Manually loading the kexts did work, however, it allowed me to run VBox after manually finishing installation (I suppose loading of the kexts is the last step), and now the installer completes installation without issues as well.

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 30. Nov 2017, 00:06
by socratis
Oh, I see. You didn't mention at your first post that the installer failed. So I guess the installer error can be a little bit misleading at moments? As in coming up with an error message, when in fact the only error is the failure to load the kernel extensions? That's interesting. That's why you didn't see that recommendation before, because I wasn't aware that VirtualBox actually got installed, but the failure was in the kext loading step. I'll keep that in mind, thanks...

We should be having this discussion elsewhere now that 10.13.1 is out. It shouldn't belong to the OSX pre-releases section...

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 30. Nov 2017, 00:18
by jbz
Not quite sure what happens, but to macOS security policy it seems to make a difference whether the kext is loaded by an Administrator user or by root (through sudo).

According to logs (also of @nonprofitSA), things fail only when kexts are loaded, but the previous steps (i.e. putting them into /Library/...) work.

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 30. Nov 2017, 00:41
by socratis
jbz wrote:Not quite sure what happens, but to macOS security policy it seems to make a difference whether the kext is loaded by an Administrator user or by root (through sudo).
The installer does use sudo. That's why you're asked about your Admin password even if you are the Admin, otherwise you could just have dragged the application straight from the DMG, something similar to Firefox, Skype or any other program that doesn't need to install kernel extensions.

The problem is with Apple's new security model. They screwed it up big time. They rushed 10.13.1 days after the original 10.13 came out, partly just to fix their installer/security. It seems that they've actually done something, because the reports have all but disappeared.

BTW, if you want to know how botched the installer is, take a look at the "postflight" script, especially the last 4 lines. If you tell me what you are doing different, compared to what the installer is "supposed" to do, I'm buying ;)
https://www.virtualbox.org/browser/vbox ... postflight

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 27. Jan 2018, 15:17
by ilg
If the GUI solution does not work, reboot in Recovery mode and enter:

Code: Select all

spctl kext-consent add VB5E2TV963
Reboot in normal mode and install should be ok.

This command does not disable the Apple security mechanism, it simply adds Oracle to the list of approved developers.

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 7. Sep 2018, 19:31
by dsp_sd
Another failure data point for you. After reading the apple technote and this thread and the kernel driver thread (viewtopic.php?f=8&t=84092), it's quite clear this is an apple problem.
I submitted an apple ticket with problemID=44233424
Just trying to provide ammo from multiple sources.

Installing on a new MacBook Pro purchased Aug 26 2018:
Model Identifier: MacBookPro15,2
Software Version: 10.13.6 (17G2307)
Status: fail

This is a new system with not much added before attempting to install vbox version VirtualBox-5.2.18-124319-OSX.

I am not accessing this computer via RDP or any other remoting sw.

All it has on it other than factory installed software is:
  • xcode command line tools
  • macvim
  • quodlibet
I have not installed brew or macports and did uninstall garageband.

The system has the latest patches available from Apple.
Ordinarily, I would just wait a problem like this out, but it is clear this problem isn't going away soon as it has been open for about a year.

The (primary) suggestions posted here and elsewhere do not work.
Opening Security & Privacy and clicking "Allow" next to the "System software from 'Oracle America, Inc.' was blocked from loading" prompt does not work.
Running the commands from the postflight script fails:

Code: Select all

# kextload    '/Library/Application Support/VirtualBox/VBoxDrv.kext'
/Library/Application Support/VirtualBox/VBoxDrv.kext failed to load - (libkern/kext) system policy prevents loading; 
check the system/kernel logs for errors or try kextutil(8).
I have tried this multiple times, with and without reboots.
In the System Information > Software > Disabled Software section all 4 kext's are listed, all with essentially the same message:

VB5E2TV963 - org.virtualbox.kext.VBoxDrv:
Version:         Unknown
Reason:          No User Consent
Date Disabled:   Unknown
Clearly, this is wrong, because I have been attempting to provide consent all morning.

Of all the hacks posted so far, I like the suggestion from ilg:

Code: Select all

spctl kext-consent add VB5E2TV963
best and plan to try that it worked like a charm.

After running
spctl
I was able to finish the installation and boot a centos image from my old Mac.

For the record, the output of

Code: Select all

# system_profiler -detailLevel mini > system_profiler.txt; kextstat | grep -v com.apple >> system_profiler.txt; gzip system_profiler.txt
is attached.

Re: 5.1.12 installer fails in OS X 10.13 High Sierra

Posted: 28. Sep 2018, 10:44
by michaln
dsp_sd wrote:Another failure data point for you. After reading the apple technote and this thread and the kernel driver thread (viewtopic.php?f=8&t=84092), it's quite clear this is an apple problem.
I submitted an apple ticket with problemID=44233424
Thanks for that and good luck.

It's obvious that the newly implemented kext security does not work reliably, but the problem tends to be very difficult to reproduce. As in we don't know (and Apple probably doesn't either) how to make it fail, and once it works, it stays working. On most systems it works as designed, with the user approving the kext developer once and there's no problem from then on. On some machines, every kext needs to be approved separately (definitely not how it's designed to work), but again once approved they stay working. The problems may be specific to certain hardware, possibly individual systems more so than specific models.

Remote access is a known problem (kexts can't be approved remotely by design, but users are left guessing what's going on), but you eliminated that as a possible problem.

Just to be certain, when you say "Opening Security & Privacy and clicking "Allow" next to the "System software from 'Oracle America, Inc.' was blocked from loading" prompt does not work", you mean that the button appears as it should, can be clicked, but has no discernible effect, right?