Fix blackhole-2ch on MacOS – Could not kickstart service “com.apple.audio.coreaudiod”: 1: Operation not permitted

Recently I received this error while upgrading or uninstalling blackhole-2ch via brew:

Could not kickstart service “com.apple.audio.coreaudiod”: 1: Operation not permitted

This was fixed by the following:

sudo su
rm -rf /opt/homebrew/Caskroom/blackhole-2ch
exit
brew install blackhole-2ch

Another option seems to be to fix the issue with kickstart as described here. But I didn’t try that.