Install script not working on Macbook M1

Keywords: LAMP/MAMP/WAMP - Installers - Technical issue - Application configuration

bndiagnostic ID: 12345678-abcd-1234-abcd-123456789abc

Description:
Hello, I am using a package and script to deploy Bitnami MAMP using our MDM, but unfortunately, the script errors when running on a M1 Macbook. The script works fine on Intel Macs. The package to deploy pushes the installer package to Private/tmp and is named MAMP, so that is why the script may look different.

Script:


#!/bin/zsh

User variables

logged_in_user=$(scutil <<< “show State:/Users/ConsoleUser” | awk ‘/Name :confused: && ! /loginwindow/ { print $3 }’)
uid=$(id -u “$logged_in_user”)

Installer variables

base_pass=“123456”
install_dir="/Users/${logged_in_user}/Applications/mampstack"

Run installer

launchctl asuser “$uid” sudo -u “$logged_in_user” /private/tmp/MAMP.app/Contents/MacOS/osx-x86_64
–mode unattended
–prefix “$install_dir”
–base_password “$base_pass”
–apache_server_port “8080”
–apache_server_ssl_port “8443”
–launch_cloud “0”

Create symlink to user desktop

ln -s “$install_dir”/manager-osx.app “/Users/${logged_in_user}/Desktop/Application Manager.app”

Clean up

rm -rf /private/tmp/MAMP.app


And this is the errors I get when running on an M1 Macbook:

ERROR: SentryCrashCPU.c (58): _Bool sentrycrashcpu_i_fillState(const thread_t, const thread_state_t, const thread_state_flavor_t, const mach_msg_type_number_t): thread_get_state: (os/kern) invalid argument
ERROR: SentryCrashCPU.c (58): _Bool sentrycrashcpu_i_fillState(const thread_t, const thread_state_t, const thread_state_flavor_t, const mach_msg_type_number_t): thread_get_state: (os/kern) invalid argument
ERROR: SentryCrashMachineContext.c (232): void sentrycrashmc_resumeEnvironment(): thread_resume (00002207): (os/kern) failure

If I install it manually, it works perfectly, so not sure why it is failing there.

Any help would be appreciated, thanks!

Sorry, didn’t do code brackets.

#!/bin/zsh

# User variables
logged_in_user=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }')
uid=$(id -u "$logged_in_user")

# Installer variables
base_pass="123456"
install_dir="/Users/${logged_in_user}/Applications/mampstack"

# Run installer
launchctl asuser "$uid" sudo -u "$logged_in_user" /private/tmp/MAMP.app/Contents/MacOS/osx-x86_64 \
--mode unattended \
--prefix "$install_dir" \
--base_password "$base_pass" \
--apache_server_port "8080" \
--apache_server_ssl_port "8443" \
--launch_cloud "0"

# Create symlink to user desktop
ln -s "$install_dir"/manager-osx.app "/Users/${logged_in_user}/Desktop/Application Manager.app"

# Clean up
rm -rf /private/tmp/MAMP.app

Hi @jnovotny,

Unfortunately M1 is currently not fully supported. Our engineers are working on adding support for it.

Regards,
Michiel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.