AlexanderWillner / runMacOSinVirtualBox

Run macOS 10.16 Big Sur (and other versions) in VirtualBox on macOS
MIT License
937 stars 125 forks source link

installinstallmacos.py fails at the installer command #135

Open billchen8888 opened 2 years ago

billchen8888 commented 2 years ago

I am running Mac OS 11.6.1, and I would need to download and use the same 11.6.1 for the VM. But the installinstallmacos.py fails at the installer command. I am not that familiar with Mac, not sure what is going wrong with the installer command.

To Reproduce

Steps to reproduce the behavior:

1) sudo ./installinatllmacos.py 2) select to download 11.6.1

Making empty sparseimage...
installer: Package name is macOS Big Sur
installer: Installing at base path /private/tmp/dmg.u4ZPKc
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An error occurred while running scripts from the package “InstallAssistant.pkg”.)
Command '['/usr/sbin/installer', '-pkg', './content/downloads/05/24/002-23589-A_ZQQIIUQAXQ/zn8n836sojdlmlvqdu7n2k4gj8roqmcysu/002-23589.English.dist', '-target', '/private/tmp/dmg.u4ZPKc']' returned non-zero exit status 1.
Product installation failed.

I manually tried to run the installer with -verbose and get a little bit more info:

 %# /usr/sbin/installer -pkg /Users/jinzhong.chen/Documents/GitHub/runMacOSinVirtualBox/content/downloads/05/24/002-23589-A_ZQQIIUQAXQ/zn8n836sojdlmlvqdu7n2k4gj8roqmcysu/002-23589.English.dist -target /private/tmp/dmg.9ev1Pg -verbose
installer: Package name is macOS Big Sur
installer: Installing at base path /private/tmp/dmg.9ev1Pg
installer: Preparing for installation….....
installer: Preparing the disk….....
installer: Preparing macOS Big Sur….....
installer: Waiting for other installations to complete….....
installer: Configuring the installation….....
installer:  
#
installer: Preparing to install….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Running package scripts….....
#
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An error occurred while running scripts from the package “InstallAssistant.pkg”.)

Please help why it fails and how I can fix it. Thanks in advance.

billchen8888 commented 2 years ago

I found this link https://github.com/munki/macadmin-scripts/issues/86 So the issue was that I cloned the scripts to Documents/
The fix is to move the the script out.