I'm curious to know if there's a reason everyone installs Homebrew in /usr/local (other than it being the default installation path). I've always chosen to install it in ~/.homebrew and haven't had any problems. Everything I install with Homebrew seems to handle an alternative prefix without issue.
El Capitan and Homebrew
31–40 of 298 posts
Re: El Capitan and Homebrew
#32I'm curious to know if there's a reason everyone installs Homebrew in /usr/local (other than it being the default installation path). I've always chosen to install it in ~/.homebrew and haven't had any problems. Everything I install with Homebrew seems to handle an alternative prefix without issue.
That's a common Unix practice to put system-wide stuff manually managed (as opposed to managed by the OS/distribution) in /usr/local.
Also, what if for some reason a single machine is shared by two people and they need different versions of some programs installed with Homebrew? Installing everything in /usr/local isn't going to look like a good idea then.
Re: El Capitan and Homebrew
#33Earlier quoted context omitted.
Then install brew with sudo.
This is what you used to see when you tried to use sudo with brew: Error: Cowardly refusing to `sudo brew install` You can use brew with sudo, but only if the brew executable is owned by root. However, this is both not recommended and completely unsupported so do so at your own risk. I don't know if it's different now, but a quick Google search indicates that brew still behaves like this. I would like to use brew wit…
When XCode needed some license approval after the recent upgrade to support iOS9, Brew warned me that license can only be approved ( programatically ) by root. I tried to sudo brew and received the warning you showed. That was 1 week ago.
Re: El Capitan and Homebrew
#34Edit: For the avoidance of any doubt/confusion, this is what a virgin /usr/local/ looks like after Homebrew has been installed:
$ ls -la /usr/local
total 96
drwxrwxr-x 13 root admin 442 31 Aug 21:52 .
drwxr-xr-x@ 12 root wheel 408 31 Aug 21:52 ..
drwxr-xr-x 14 jgavigan admin 476 31 Aug 21:52 .git
-rw-r--r-- 1 jgavigan admin 448 31 Aug 21:52 .gitignore
-rw-r--r-- 1 jgavigan admin 291 31 Aug 21:52 .yardopts
-rw-r--r-- 1 jgavigan admin 3161 31 Aug 21:52 CODEOFCONDUCT.md
-rw-r--r-- 1 jgavigan admin 1103 31 Aug 21:52 CONTRIBUTING.md
-rw-r--r-- 1 jgavigan admin 1241 31 Aug 21:52 LICENSE.txt
drwxr-xr-x 9 jgavigan admin 306 31 Aug 21:52 Library
-rw-r--r-- 1 jgavigan admin 2319 31 Aug 21:52 README.md
-rw-r--r-- 1 jgavigan admin 23801 31 Aug 21:52 SUPPORTERS.md
drwxr-xr-x 3 jgavigan admin 102 31 Aug 21:52 bin
drwxr-xr-x 4 jgavigan admin 136 31 Aug 21:52 shareRe: El Capitan and Homebrew
#35I'm curious to know if there's a reason everyone installs Homebrew in /usr/local (other than it being the default installation path). I've always chosen to install it in ~/.homebrew and haven't had any problems. Everything I install with Homebrew seems to handle an alternative prefix without issue.
brew supports pre-compiled binary packages (what they call bottles ) only when you use the default install location /usr/local. If you use any other prefix brew will always compile all packages on your system, which might take a long time depending on the performance of your system. So using /usr/local saves time and energy since all brew needs to do is to download and install binary packages.
Re: El Capitan and Homebrew
#36Earlier quoted context omitted.
Actually it sounds like you will need to run this/restore permissions after every future OS X update.
Hmm, having been on El Capitan since the first beta, this hasn't happened. Do you have anywhere it states that?
"Apple documentation hints that /usr/local will be returned to root:wheel restricted permissions on every OS X update; Homebrew will be adding a brew doctor check to warn you when this happens in the near future."
Re: El Capitan and Homebrew
#37I just did this (from [1]): sudo chown -R $(whoami):admin /usr/local And not `sudo chown $(whoami):admin /usr/local`. Are both really necessary? [1]: https://news.ycombinator.com/item?id=10307800
The -R was a bit overkill - what's inside /usr/local should already have had the correct owner - the problem is the owner of /usr/local itself.
Re: El Capitan and Homebrew
#38I'm curious to know if there's a reason everyone installs Homebrew in /usr/local (other than it being the default installation path). I've always chosen to install it in ~/.homebrew and haven't had any problems. Everything I install with Homebrew seems to handle an alternative prefix without issue.
Because it has never caused any trouble having it in /usr/local, and as another user said /usr/local/bin is part of the standard path. Other than this one-liner, which is done once, there really isn't any extra hassle with using the default. I'd be more interested in why you didn't want to install it there?
Someone I know puts it in ~/brew and that works just fine, too. His reasoning is that /usr/local/ is for all users, and though he's really the only user on his laptop, it's just wrong to install a bunch of stuff that's just for him into a global user directory.
Re: El Capitan and Homebrew
#39 $ sudo mv local local.old
mv: rename local to local.old: Operation not permittedRe: El Capitan and Homebrew
#40Couldn't all this be avoided if Homebrew installed itself in a sub-directory of /usr/local (e.g. /usr/local/homebrew) instead of /usr/local itself? Edit: For the avoidance of any doubt/confusion, this is what a virgin /usr/local/ looks like after Homebrew has been installed: $ ls -la /usr/local total 96 drwxrwxr-x 13 root admin 442 31 Aug 21:52 . drwxr-xr-x@ 12 root wheel 408 31 Aug 21:52 .. drwxr-xr-x 14 jgavigan ad…