Leaf setup fails - command returned 126

I’ve been successful in programming my mangoh red with the VM, however, the IP address seems to drop out after a random amount of time, and it requires a reset to bring it back up. This partially crashes the VM, and requires a VM reboot. It’s all very annoying, and so I’ve decided to connect the mangoh red board to a raspberry pi and build the apps on there, and install them from there. This is for testing only. Unfortunately after building everything I need on the RPi, the leaf profile setup command seems to fail, and I’m at a loss as to how to correct this. If anyone can help I would greatly appreciate it. The ‘leaf profile sync’ command also returns the same error.

leaf setup test1 -p mangoh-red-wp77xx_0.6.0

-> Execute: leaf profile create test1

Current profile is now test1

Profile test1 created

-> Execute: leaf profile config test1 -p mangoh-red-wp77xx_0.6.0

-> Execute: leaf profile sync test1

Profile is out of sync

Packages to install: wp77-image_3.4.0, swi-legato_1.4.191225, swi-vscode-support_200624, swi-wp77_3.4.0, Octave-mangOH-red-wp77xx_3.0.0-pre23April2020-mangOH-0, mangoh-red-wp77xx_0.6.0

Total size: 13.3 MB

Do you want to continue? (Y/n)

y

Run sync steps for swi-aptdeps-image_1.0

Run sync steps for swi-license_1.2

Run sync steps for swi-verify-aptdeps_1.6.191122

Checking required apt packages..

It is recommended to have the latest version of swiflash swicwe

sudo apt-get update && sudo apt-get install --upgrade -y swiflash swicwe

Do you want to execute this command (Y/n)? y

Hit:1 http://archive.raspberrypi.org/debian buster InRelease

Hit:2 https://downloads.sierrawireless.com/tools/debian release/ InRelease

Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]

Fetched 15.0 kB in 2s (8,784 B/s)

Reading package lists... Done

Reading package lists... Done

Building dependency tree

Reading state information... Done

swicwe is already the newest version (1.25).

swiflash is already the newest version (5.1).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

All system dependencies are OK

Run sync steps for swi-verify-license_1.4.190813

License already accepted: sierra-v1

Downloading 6 package(s)

[1/6] Installing wp77-image_3.4.0

Run install steps for wp77-image_3.4.0

Generating device image: 9999999_9907618_SWI9X06Y_02.13.02.00_00_GENERIC_001.009_001-full.spk

Error during installation: Error during install step for wp77-image_3.4.0 (command returned 126)

ERROR:

**Profile provisioning interrupted**

CAUSED BY:

**Error during install step for wp77-image_3.4.0 (command returned 126)**

HINT:

try **leaf profile sync** to resume

Command exited with 2

ERROR:

**Sub command failed: 'leaf profile sync test1'**

You won’t be able to build the apps on a Raspberry Pi since it’s an arm based architecture and the toolchain is for x86-64.