Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.77k stars 12.45k forks source link

blackhole-2ch: ""com.apple.audio.coreaudiod": 1: Operation not permitted" error #170172

Closed slhck closed 6 months ago

slhck commented 6 months ago

brew gist-logs <formula> link OR brew config AND brew doctor output

HOMEBREW_VERSION: 4.2.19-111-gcaff135
ORIGIN: https://github.com/Homebrew/brew
HEAD: caff1359de1ae7ac198fa7081d905d2a535af3a1
Last commit: 4 hours ago
Core tap HEAD: bf235c95f4967aae0fdd3be2daf268120e3663af
Core tap last commit: 44 minutes ago
Core tap JSON: 26 Apr 18:05 UTC
Core cask tap HEAD: 8db982a3f0f0239af893e613adbb3dcf3dad9672
Core cask tap last commit: 2 hours ago
Core cask tap JSON: 26 Apr 18:05 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.y3lRd5giWi/org.xquartz:0
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.44.0 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.4.1-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.3
Rosetta 2: false

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  libgit2@1.6
  lua@5.3
  openssl@1.1
  python-charset-normalizer
  python-dateutil
  python-idna
  python-pytz
  python-requests
  python-typing-extensions
  python-urllib3
  python@3.8

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  inetutils

Verification

What were you trying to do (and why)?

brew upgrade

This led to:

==> Updating Homebrew...
Already up-to-date.
==> Casks with 'auto_updates true' or 'version :latest' will not be upgraded; pass `--greedy` to upgrade them.
==> Upgrading 2 outdated packages:
blackhole-2ch 0.5.0 -> 0.6.0
upscayl 2.10.0 -> 2.11.0
==> Upgrading blackhole-2ch
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/8db982a3f0f0239af893e613adbb3dcf3dad9672/Casks/b/blackhole-2ch.rb
Already downloaded: /Users/werner/Library/Caches/Homebrew/downloads/6365a988c68bce36d78b2de23a6de88ce4494f40ce2015649f25aa7eb4e9791b--blackhole-2ch.rb
==> Downloading https://existential.audio/downloads/BlackHole2ch-0.6.0.pkg
Already downloaded: /Users/werner/Library/Caches/Homebrew/downloads/094ac75837aa76e51e9defa1f6623144c5a3b223a1b426cf5ddb42c224e70c4a--BlackHole2ch-0.6.0.pkg
==> Uninstalling packages with sudo; the password may be necessary:
Could not kickstart service "com.apple.audio.coreaudiod": 1: Operation not permitted
==> Purging files for version 0.6.0 of Cask blackhole-2ch
==> Upgrading upscayl
==> Downloading https://github.com/upscayl/upscayl/releases/download/v2.11.0/upscayl-2.11.0-mac.dmg
Already downloaded: /Users/werner/Library/Caches/Homebrew/downloads/47b6f106ffe3290c80bc1fb4534891646119ca5c2e743273dedf9d80554c3970--upscayl-2.11.0-mac.dmg
==> Purging files for version 2.11.0 of Cask upscayl
Error: Problems with multiple casks:
blackhole-2ch: Failure while executing; `/usr/bin/sudo -E -- /bin/launchctl kickstart -kp system/com.apple.audio.coreaudiod` exited with 1. Here's the output:
Could not kickstart service "com.apple.audio.coreaudiod": 1: Operation not permitted

Trying to uninstall:

brew uninstall blackhole-2ch

I got the same error, see below.

What happened (include all command output)?

==> Uninstalling Cask blackhole-2ch
==> Uninstalling packages with sudo; the password may be necessary:
Could not kickstart service "com.apple.audio.coreaudiod": 1: Operation not permitted
Error: Failure while executing; `/usr/bin/sudo -E -- /bin/launchctl kickstart -kp system/com.apple.audio.coreaudiod` exited with 1. Here's the output:
Could not kickstart service "com.apple.audio.coreaudiod": 1: Operation not permitted

What did you expect to happen?

Clean uninstallation.

Apparently under Sonoma 14.4, this is a known issue?

To improve security and stability, using launchctl kickstart -k is no longer permitted for critical system processes. If a process must be forcefully terminated, it is recommended to use kill instead. (123028502)

Step-by-step reproduction instructions (by running brew commands)

See above
slhck commented 6 months ago
sudo killall coreaudiod

seems to do the job. I see that the formula was fixed in https://github.com/Homebrew/homebrew-cask/commit/d6de09ea49580c5e73fcf3db6c35f18249affb28 — but apparently it's impossible to upgrade it?

slhck commented 6 months ago

Ah, I looked in the wrong repository. Closing in favor of https://github.com/Homebrew/homebrew-cask/issues/171570