I’ve had success using Homebrew in a multi-user environment the following way:
Create a new (non-GUI) user, group and home directory:
sudo /usr/sbin/sysadminctl -addUser brew \
-fullName 'Homebrew' -admin -home /var/brew \
-password - -UID 430 \
| <?xml version="1.0" encoding="utf-8"?> | |
| <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> | |
| <ShortName>AUR</ShortName> | |
| <LongName>Arch User Repository</LongName> | |
| <Description/> | |
| <InputEncoding>UTF-8</InputEncoding> | |
| <Image height="16" width="16" type="image/x-icon">https://www.archlinux.org/static/favicon.29302f683ff8.ico</Image> | |
| <Image height="64" width="64" type="image/png">https://www.archlinux.org/static/logos/icon-transparent-64x64.9ed71ce9197d.png</Image> | |
| <Url type="text/html" template="https://aur.archlinux.org/packages/"> | |
| <Param name="O" value="0"/> |
| $ brew reinstall gettext | |
| […] | |
| $ gettext --version | |
| Killed: 9 | |
| $ replace_inode() { | |
| local filename | |
| for filename; do | |
| chmod o+w "${filename}" | |
| rm -f "${filename}.bak" | |
| mv -f "${filename}" "${filename}.bak" |
Thanks to @indirect’s help, I’m back up and running.
Turns out there’s that directory /Library/Ruby/Gems/2.6.0/specifications/default. It contains a couple of gemspecs you really can’t (and shouldn’t ever) delete.
With the default gemspecs back in place, I was able to apply the fiddle hack mentioned below, and got Homebrew working again.
| Homebrew build logs for openjdk on macOS 11.0 | |
| Build date: 2020-07-07 12:28:36 |
| Homebrew build logs for x264 on macOS 11.0 | |
| Build date: 2020-07-01 07:39:34 |
| # Copy and paste the following snippet, including brackets, into the Terminal | |
| ( | |
| set -e; | |
| cd "$(mktemp -d)" | |
| curl -LO 'http://www.newosxbook.com/tools/jtool2.tgz' | |
| tar -x -f jtool2.tgz | |
| lipo jtool2 -thin x86_64 -output jtool2.x86_64 | |
| lipo disarm -thin x86_64 -output disarm.x86_64 | |
| sudo mkdir -p /usr/local/bin |
| #!/bin/bash | |
| set -eu; | |
| echo >&2 'Quitting Airmail 3' | |
| osascript -e 'tell app "Airmail 3" to quit' | |
| echo >&2 'Quitting Airmail Beta' | |
| osascript -e 'tell app "Airmail Beta" to quit' | |
| echo >&2 'Asserting that Airmail Beta data is available' |
I hereby claim:
To claim this, I am signing this object:
bundle install on macOS if it fails with cannot load such file -- rubygems/format (LoadError)On macOS, chances are that bundle install … fails with the following error:
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- rubygems/format (LoadError)
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.2.3/lib/bundler/source.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.2.3/lib/bundler/dsl.rb:21:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.2.3/lib/bundler/dsl.rb:6:in `new'