myspaghetti / macos-virtualbox

Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox on x86 CPUs for Windows, Linux, and macOS
GNU General Public License v2.0
13.5k stars 1.11k forks source link

declare_scancode_dict:2: no matches found: [ESC]=01 81 #197

Closed fejx closed 4 years ago

fejx commented 4 years ago

I am using Ubuntu WSL on Windows 10. The working directory is in my Windows home folder (/mnt/c/Users/fejx). In the stage populate_virtual_disks, the script crashes with the following error message: declare_scancode_dict:2: no matches found: [ESC]=01 81.

Any ideas on how to resolve the issue? Your help would be much appreciated.

Full console output

``` Push-button installer of macOS on VirtualBox This script installs only open-source software and unmodified Apple binaries, and requires about 40GB of available storage, of which 20GB are for temporary installation files that may be deleted when the script is finished. The script interacts with the virtual machine twice, please do not interact with the virtual machine manually before the script is finished. Documentation about optional configuration, iCloud and iMessage connectivity, resuming the script by stages, and other topics can be viewed with the following command: ./macos-guest-virtualbox.sh documentation | less -R Press enter to review the script configuration. vm_name="macOS" macOS_release_name="Catalina" # install "HighSierra" "Mojave" or "Catalina" storage_size=80000 # VM disk image size in MB. minimum 22000 cpu_count=2 # VM CPU cores, minimum 2 memory_size=4096 # VM RAM in MB, minimum 2048 gpu_vram=128 # VM video RAM in MB, minimum 34, maximum 128 resolution="2560x1440" # VM display resolution These values may be customized as described in the documentation. Press enter to continue, CTRL-C to exit. Some versions of WSL require the script to run on a Windows filesystem path, for example /mnt/c/Users/Public/Documents Switch to a path on the Windows filesystem if VBoxManage.exe fails to create or open a file. Press enter to continue, CTRL-C to exit. Catalina selected to be downloaded and installed stage: prompt_delete_existing_vm A virtual machine named "macOS" already exists. Delete existing virtual machine "macOS"? [y/N] Deleting macOS virtual machine. 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% stage: create_vm stage: prepare_macos_installation_files Downloading Apple macOS Catalina software update catalog Catalina_sucatalog 100%[================================================>] 6.15M 1.50MB/s in 4.1s Trying to find macOS Catalina InstallAssistant download URL Catalina_sucatalog_00_Install 100%[================================================>] 39.98K --.-KB/s in 0.04s Found download URL: http://swcdn.apple.com/content/downloads/35/40/061-96006-A_3D42K49AN3/r1513y9zscckrsmy018hbcryom8nq7gg1t/ Downloading macOS installation files from swcdn.apple.com Splitting the several-GB InstallESDDmg.pkg into 1GB parts because VirtualBox hasn't implemented UDF/HFS VISO support yet and macOS doesn't support ISO 9660 Level 3 with files larger than 2GB. creating file 'Catalina_InstallESD.part00' creating file 'Catalina_InstallESD.part01' creating file 'Catalina_InstallESD.part02' creating file 'Catalina_InstallESD.part03' creating file 'Catalina_InstallESD.part04' creating file 'Catalina_InstallESD.part05' creating file 'Catalina_InstallESD.part06' creating file 'Catalina_InstallESD.part07' stage: create_nvram_files generate_nvram_bin_file:8: bad math expression: operand expected at `"3"' generate_nvram_bin_file:8: bad math expression: operand expected at `"3"' generate_nvram_bin_file:8: bad math expression: operand expected at `"9"' generate_nvram_bin_file:8: bad math expression: operand expected at `"17"' stage: create_macos_installation_files_viso Creating EFI startup script Creating VirtualBox 6 virtual ISO containing the installation files from swcdn.apple.com stage: create_basesystem_vdi Converting BaseSystem.dmg to BaseSystem.img dmg2img v1.6.7 (c) vu1tur (to@vu1tur.eu.org) Catalina_BaseSystem.dmg --> Catalina_BaseSystem.img decompressing: opening partition 0 ... 100.00% ok opening partition 1 ... 100.00% ok opening partition 2 ... 100.00% ok opening partition 3 ... 100.00% ok opening partition 4 ... 100.00% ok opening partition 5 ... 100.00% ok opening partition 6 ... 100.00% ok opening partition 7 ... 100.00% ok Archive successfully decompressed as Catalina_BaseSystem.img Converting from raw image file="Catalina_BaseSystem.img" to file="Catalina_BaseSystem.vdi"... Creating dynamic image with size 2144960512 bytes (2046MB)... stage: create_target_vdi Creating macOS target system virtual disk image. 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Medium created. UUID: e86773c4-c03a-4522-b01f-c8391901ee63 stage: create_install_vdi Creating Catalina installation media virtual disk image. 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Medium created. UUID: 898be701-02fc-4721-bbb1-b7ed66deb4aa stage: configure_vm stage: populate_virtual_disks Starting virtual machine macOS. This should take a couple of minutes. While the script is running, please do not interact with the virtual machine. declare_scancode_dict:2: no matches found: [ESC]=01 81 ```

myspaghetti commented 4 years ago

Thanks for the bug report. Looks like zsh versions lower than 5.5 don't support bash-style declarations of associative arrays. I'll either raise the zsh version requirement to 5.5 or find a compatible associative array declaration format.

Either way please mind that zsh is not currently supported.

myspaghetti commented 4 years ago

Bumped zsh version requirement to 5.5 in version 0.90.4