I've been trying to find a way to install macOS High Sierra using terminal to install it on various computers quickly. It can be done with macOS Sierra and OS X El Capitan after mounting the InstallESD.dmg file in the directory Install macOS Sierra.app/Contents/SharedSupport using the following code in terminal:

installer -allowUntrusted -pkg Volumes/OS\ X\ Install\ ESD/Packages/OSInstall.mpkg -target Volumes/Macintosh\ HD

I've tried using the same methods to install High Sierra, but it always gives the following error:

The OS Install failed with error: Error Domain=NSPOSIXErrorDomain Code=0 "Undefined error:0

There aren't many articles online for finding a solution to this issue, but there are many about creating a bootable drive. Thank you in advance for the answers.

  • Did you ever solve this? I’m having the same issue. Commented Nov 20, 2017 at 22:59
  • Same problem here even with properly formed POSIX path (ie, leading /).
    – ylluminate
    Commented Mar 26, 2018 at 23:36

2 Answers 2


You can run:

sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall –applicationpath /Applications/Install\ macOS\ High\ Sierra.app

Info from OWC Article: Click Here To See


Unlike previous versions, the High Sierra installer requires a "POSIX-ly correctly formed" path to the locations of both the installation source and the installation target. Adding a leading "/" to each occurrence of "Volumes" should eliminate the error.

  • Unfortunately this doesn't actually help or resolve the issue. sudo installer -allowUntrusted -pkg /Volumes/InstallESD/Packages/OSInstall.mpkg -target /Volumes/Target\ Drive/ yields the same resultant error as noted above.
    – ylluminate
    Commented Mar 27, 2018 at 0:03
  • @E. Bauer: Six months later, and of no real value as to timeliness, but... It seems that error code 0 in the NSPOSIXErrorDomain gets thrown during OS High Sierra installation only when the installation is being attempted on non-Apple hardware. These "various computers" are all Macs, right?
    – Doc G.
    Commented Apr 15, 2018 at 18:08
  • Yep, they're bonafide Mac Pros on my end @doc-g.
    – ylluminate
    Commented Apr 16, 2018 at 21:01
  • @ylluminate: Thanks--since it's true in your case, it was likely true for the OP as well.
    – Doc G.
    Commented Apr 17, 2018 at 13:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .