BackgroundMusic icon indicating copy to clipboard operation
BackgroundMusic copied to clipboard

Installer showing confusing error message about BGMXPCHelper

Open kyleneideck opened this issue 7 years ago • 1 comments

Reported by @quicksite in https://github.com/kyleneideck/BackgroundMusic/issues/146#issuecomment-415954049.

screen shot 2018-08-25 at 1 15 44 am

It looks like the one of the installer scripts, pkg/preinstall, is running the script BGMApp/BGMXPCHelper/safe_install_dir.sh to figure out where to install BGMXPCHelper, but it's not getting anything back. safe_install_dir.sh is supposed to print out a path like "/usr/local/libexec", but it's not printing anything for some reason.

@quicksite Could you save a copy of safe_install_dir.sh, open /Applications/Utilities/Terminal.app and run the command /bin/bash -x /path/to/safe_install_dir.sh -y? Make sure to change /path/to/ to the path to the directory you saved safe_install_dir.sh to. Then post the output it gives you. It'll probably print a lot because of the -x.

It might also be worth trying a newer snapshot release just in case that fixes it.

kyleneideck avatar Aug 28 '18 14:08 kyleneideck

I had a similar problem while installing 0.4.0-SNAPSHOT-b38f6dd (I'm on macOS Monterey 12.4). Afterwards, I downloaded and ran safe_install_dir.sh and it printed:

$ /bin/bash -x ~/Desktop/safe_install_dir.sh -y
+ PATH=/bin:/sbin:/usr/bin:/usr/sbin
+ export PATH
+ set -euo pipefail
+ IFS='
	'
+ ALLOW_UNSAFE_FALLBACK=0
+ [[ ! -z x ]]
+ [[ -y == \-\y ]]
+ ALLOW_UNSAFE_FALLBACK=1
+ INSTALL_DIR=/usr/local/libexec
+ BACKUP_INSTALL_DIR='/Library/Application Support/Background Music'
+ [[ ! -e /usr/local ]]
+ [[ ! -e /usr/local/libexec ]]
+ check_dir /usr/local/libexec
+ pushd .
++ cd /usr/local/libexec
++ pwd -P
+ REAL_PATH=/usr/local/libexec
+ cd /usr/local/libexec
+ DIR_IS_SAFE=0
++ stat -f %u .
+ [[ 0 == 0 ]]
++ stat -f %Lp .
+ [[ 0 -eq 0 ]]
+ cd ..
+ [[ /usr/local -ef / ]]
++ stat -f %u .
+ [[ 0 == 0 ]]
++ stat -f %Lp .
+ [[ 0 -eq 0 ]]
+ cd ..
+ [[ /usr -ef / ]]
++ stat -f %u .
+ [[ 0 == 0 ]]
++ stat -f %Lp .
+ [[ 0 -eq 0 ]]
+ cd ..
+ [[ / -ef / ]]
+ DIR_IS_SAFE=1
+ break
+ popd
+ [[ 1 -eq 1 ]]
+ FINAL_INSTALL_DIR=/usr/local/libexec
+ echo /usr/local/libexec
/usr/local/libexec

Hope this helps.

pastelmind avatar Jun 10 '22 02:06 pastelmind