Open fatso83 opened 12 months ago
I just tried brew install --cask background-music
in a macOS 14.2 VM and it worked for me. Do you get any useful info in /var/log/install.log
? After the installer fails, does it leave files/dirs at /Library/Audio/Plug-Ins/HAL/Background Music Device.driver
, /Applications/Background Music.app
, /usr/local/libexec/BGMXPCHelper.xpc
or /Library/LaunchDaemons/com.bearisdriving.BGM.XPCHelper.plist
?
❯ ls -l /usr/local/libexec/BGMXPCHelpe*
ls: /usr/local/libexec/BGMXPCHelpe*: No such file or directory
❯ ls -l /Library/LaunchDaemons/com.bearisdriving.BGM.XPCHelper.plist
ls: /Library/LaunchDaemons/com.bearisdriving.BGM.XPCHelper.plist: No such file or directory
Same issue with macOS 14.4 as well.
$ brew install --cask background-music
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/e7eff192e3592cd3985c4caf2c3018a94c0d0ef9/Casks/b/background-music.rb
Already downloaded: /Users/ateeq-ahmed/Library/Caches/Homebrew/downloads/35046a6886424909ded19a71b6d131fd1e3e57d70025d7e9640e40d8e4fa0118--background-music.rb
Warning: Cannot verify integrity of '35046a6886424909ded19a71b6d131fd1e3e57d70025d7e9640e40d8e4fa0118--background-music.rb'.
No checksum was provided.
For your reference, the checksum is:
sha256 "1421091f4b79378b83a6019f773b31551f79b6d3d73ef7b0030ba90f32982f5a"
==> Downloading https://github.com/kyleneideck/BackgroundMusic/releases/download/v0.4.0/BackgroundMusic-0.4.0.pkg
Already downloaded: /Users/ateeq-ahmed/Library/Caches/Homebrew/downloads/435510f1a16f3dbd5aa66794c4fd9959b36f716ac52b92179b2cbe13137112c0--BackgroundMusic-0.4.0.pkg
==> Installing Cask background-music
==> Running installer for background-music with sudo; the password may be necessary.
installer: Package name is Background Music 0.4.0
installer: Installing at base path /
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 “BackgroundMusic-0.4.0.pkg”.)
==> Purging files for version 0.4.0 of Cask background-music
Error: Failure while executing; `/usr/bin/sudo -u root -E LOGNAME=ateeq-ahmed USER=ateeq-ahmed USERNAME=ateeq-ahmed -- /usr/sbin/installer -pkg /opt/homebrew/Caskroom/background-music/0.4.0/BackgroundMusic-0.4.0.pkg -target /` exited with 1. Here's the output:
installer: Package name is Background Music 0.4.0
installer: Installing at base path /
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 “BackgroundMusic-0.4.0.pkg”.)
$npx envinfo --system
npx: installed 1 in 1.028s
System:
OS: macOS 14.4
CPU: (11) x64 Apple M3 Pro
Memory: 46.77 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
$ tree /Applications/Background\ Music.app/
/Applications/Background Music.app/
└── Contents
├── Info.plist
├── MacOS
│ └── Background Music
├── PkgInfo
├── Resources
│ ├── AppIcon.icns
│ ├── Assets.car
│ ├── BGMApp.sdef
│ ├── Base.lproj
│ │ └── MainMenu.nib
│ │ ├── keyedobjects-101300.nib
│ │ └── keyedobjects.nib
│ ├── GooglePlayMusicDesktopPlayer.js
│ ├── LICENSE
│ ├── _uninstall-non-interactive.sh
│ └── uninstall.sh
└── _CodeSignature
└── CodeResources
launchctl kickstart
isn't working on 14.4, killall -9 coreaudiod
does however
On 14.4 I also get this error after running brew install --cask background-music
❯ brew install --cask background-music
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/61b6410596504e3be069f74209268eee3d6419d4/Casks/b/background-music.rb
Already downloaded: /Users/jpalmer/Library/Caches/Homebrew/downloads/5d7638309859535a3fb21772b4ac087254559ed7c18cb13b1836a39081137d0d--background-music.rb
==> Downloading https://github.com/kyleneideck/BackgroundMusic/releases/download/v0.4.0/BackgroundMusic-0.4.0.pkg
Already downloaded: /Users/jpalmer/Library/Caches/Homebrew/downloads/435510f1a16f3dbd5aa66794c4fd9959b36f716ac52b92179b2cbe13137112c0--BackgroundMusic-0.4.0.pkg
==> Installing Cask background-music
==> Running installer for background-music with sudo; the password may be necessary.
installer: Package name is Background Music 0.4.0
installer: Installing at base path /
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 “BackgroundMusic-0.4.0.pkg”.)
==> Purging files for version 0.4.0 of Cask background-music
Error: Failure while executing; `/usr/bin/sudo -u root -E LOGNAME=jpalmer USER=jpalmer USERNAME=jpalmer -- /usr/sbin/installer -pkg /opt/homebrew/Caskroom/background-music/0.4.0/BackgroundMusic-0.4.0.pkg -target /` exited with 1. Here's the output:
installer: Package name is Background Music 0.4.0
installer: Installing at base path /
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 “BackgroundMusic-0.4.0.pkg”.)
(base)
However all the files seems to be installed and after running sudo killall coreaudiod
I could start Background Music.app
same issue here, can't install via .pkg on MacBook m2 runs on Sonoma 14.4
And apple even documented this macOS 14.4 change and offered the same work around. I only just stumbled upon this.
Thanks everyone. I've updated the installer to use sudo killall coreaudiod
. (As far as I can tell, it doesn't need to be killall -9
.)
@fatso83 From your install.log
(thanks for that), I don't think this issue will be fixed for you yet, unfortunately.
2023-12-18 10:07:23+01 MacBook-Pro package_script_service[27149]: ./preinstall: sudo: unable to initialize PAM: Undefined error: 0
2023-12-18 10:07:23+01 MacBook-Pro package_script_service[27149]: ./preinstall: is not a directory.
I think this means, when the installer's preinstall script first called the safe_install_dir.sh script, it failed at line 152, line 157 or line 180 because sudo
failed with "sudo: unable to initialize PAM: Undefined error: 0".
Is sudo
working on your system? I'm guessing you would have noticed that and it's just that preinstall scripts aren't allowed to use sudo
or something, but if not, https://unix.stackexchange.com/a/636983/335482 or https://gist.github.com/bulletinmybeard/fa17ad819e23f3d8629aa723982d4703 might help.
safe_install_dir.sh
should only reach those lines when /usr/local/libexec
doesn't exist on your system or has unsafe permissions/ownership. Do you have that directory?
The permissions/ownership check fails if /usr/local/libexec
, /usr/local
or /usr
isn't owned by root:wheel
or is writable by group or other. You can check that manually with stat /usr /usr/local /usr/local/libexec
.
Description of the bug The installer fails no matter if using Homebrew or the standalone package.
Steps to reproduce
❯ npx envinfo --system
System: OS: macOS 14.1.2 CPU: (12) arm64 Apple M2 Max Memory: 9.94 GB / 64.00 GB Shell: 5.2.21 - /opt/homebrew/bin/bash