4 ms·
> Homebrew wants you to change ownership of /usr/local to your individual user If I read homebrew's install.sh correctly, it changes ownership of a few directo
by banana_giraffe 6y ago
> Homebrew wants you to change ownership of /usr/local to your individual user
If I read homebrew's install.sh correctly, it changes ownership of a few directories under /usr/local, not /usr/local itself (on x86, on ARM it follows a different path). This matches how my current Mac, which has brew, is currently setup as well.
# Required installation paths. To install elsewhere (which is unsupported)
# you can untar https://github.com/Homebrew/brew/tarball/master
# anywhere you like.
...
# On Intel macOS, this script installs to /usr/local only
HOMEBREW_PREFIX="/usr/local"
...
directories=(bin etc include lib sbin share opt var
Frameworks
etc/bash_completion.d lib/pkgconfig
share/aclocal share/doc share/info share/locale share/man
share/man/man1 share/man/man2 share/man/man3 share/man/man4
share/man/man5 share/man/man6 share/man/man7 share/man/man8
var/log var/homebrew var/homebrew/linked
bin/brew)
group_chmods=()
for dir in "${directories[@]}"; do
if exists_but_not_writable "${HOMEBREW_PREFIX}/${dir}"; then
group_chmods+=("${HOMEBREW_PREFIX}/${dir}")
fi
done
... and further on, after some checks, group_chmods turns into chowns ...
if [[ "${#chowns[@]}" -gt 0 ]]; then
ohai "The following existing directories will have their owner set to ${tty_underline}${USER}${tty_reset}:"
printf "%s\n" "${chowns[@]}"
fi
- anaerobicover 6y agoParent's information is outdated, but originally/historically Homebrew did want you to chown /usr/local
- anaerobicover 6y agoActually (I can't edit the original comment anymore) it looks like they were still recommending this as recently as last year?? https://discourse.brew.sh/t/permission-problems/3011/29 https://discourse.brew.sh/t/permission-problems/3011/29 Haven't used Homebrew in quite a time, so I'm not sure.
- loeg 6y agoAs recently as like, 1-3 months ago, yeah? I would have tried to install homebrew for the first time sometime December 2020 or later.