Does Homebrew install packages in /usr/local/bin
by default, i.e. it puts the binaries there?
Can we tell Homebrew to put the binaries somewhere else?
The binaries are located at /usr/local/bin
.
From the Homebrew FAQ:
Why does Homebrew insist I install to
/usr/local
?
- It’s easier
/usr/local/bin
is already in yourPATH
.- It’s easier
Tons of build scripts break if their dependencies aren’t in either/usr
or/usr/local
. We fix this for Homebrew formulae (although we don’t always test for it), but you’ll find that many RubyGems and Python setup scripts break which is something outside our control.- It’s safe
Apple has left this directory for us. Which means there is no/usr/local
directory by default, so there is no need to worry about messing up existing tools.If you plan to install gems that depend on brews then save yourself a bunch of hassle and install to
/usr/local
!It is not always straightforward to tell
gem
to look in non-standard directories for headers and libraries. If you choose/usr/local
, many things will "just work".
You could change the location (aka prefix), however it's not recommended. From the docs:
However do yourself a favor and install to
/usr/local
. Some things may not build when installed elsewhere. One of the reasons Homebrew just works relative to the competition is because we recommend installing to/usr/local
. Pick another prefix at your peril!mkdir homebrew && curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C homebrew
Create a Homebrew installation wherever you extract the tarball. Whichever brew command is called is where the packages will be installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With