Live data from Hacker News

El Capitan and Homebrew

github.com

11–20 of 298 posts

Re: El Capitan and Homebrew

#11
Why does brew need to install everything owned by my user in /usr/local? I would honestly prefer if everything installed by brew was owned by root:wheel and brew would gracefully abort if I forgot to run it with sudo.

Is all that current mess just so that I don't need sudo for brew?

Re: El Capitan and Homebrew

#12
post #11

Why does brew need to install everything owned by my user in /usr/local? I would honestly prefer if everything installed by brew was owned by root:wheel and brew would gracefully abort if I forgot to run it with sudo. Is all that current mess just so that I don't need sudo for brew?

Then install brew with sudo.

Re: El Capitan and Homebrew

#13
post #9
post #3

Will homebrew switch the default install location out of /usr/local for new installations then? I doubt most developers will want to dive into recovery mode just to install wget.

you don't need to. You only need to if you have manually deleted /usr/local for some reason. /usr/local is exempt from system integrity protection. The only problem is that its owner gets reset to root on every OS update, whereas Homebrew wants its owner to be the Homebrew user. The advantage of /usr/local as the installation root is that /usr/local/bin is in the default PATH of the OS and that setting the PATH in a…

Are you sure it gets reset to root? I've been on since the first public beta, quickly fixed the homebrew problem, and haven't had any permission issues since. Admittedly I can't say if normal updates will behave different from the beta ones.

Re: El Capitan and Homebrew

#14

So I guess, for new installations it's better to put homebrew into $HOME?

I was just reading the Arstechnica article, which mentions this:

> Instead of allowing developers to put files wherever they want, El Cap offers four canonical safe locations for applications, support files, and drivers:

> /Library

> ~/Library

> /usr/local

> /Applications

> The local or system library directories are the preferred stand-in for /System, and /usr/local is the preferred stand-in for /usr, /bin , and /sbin. However, Apple strongly recommends that developers use /Applications for everything if possible, since that keeps all of an app’s files in a single location for ease of uninstallation.

Re: El Capitan and Homebrew

#15
post #11

Why does brew need to install everything owned by my user in /usr/local? I would honestly prefer if everything installed by brew was owned by root:wheel and brew would gracefully abort if I forgot to run it with sudo. Is all that current mess just so that I don't need sudo for brew?

What is /usr/local for, if its not for locally installed (by the user) sub-components?

Just curious whats wrong with using /usr/local. This is what its for, after all ..

Re: El Capitan and Homebrew

#16
post #4

I 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

No, only command with `-R` is necessary.

Re: El Capitan and Homebrew

#17
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.

Re: El Capitan and Homebrew

#19
post #17

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.

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?

Re: El Capitan and Homebrew

#20
post #11

Why does brew need to install everything owned by my user in /usr/local? I would honestly prefer if everything installed by brew was owned by root:wheel and brew would gracefully abort if I forgot to run it with sudo. Is all that current mess just so that I don't need sudo for brew?

What is /usr/local for, if its not for locally installed (by the user) sub-components? Just curious whats wrong with using /usr/local. This is what its for, after all ..

Using /usr/local is just fine. But I feel uneasy when a system directory is owned by just my user. What if there is another user on my system that also wants to perform a brew update?

Using sudo would also be a security advantage since not every program running under your username would be able to modify all binaries in /usr/local.

Post reply on HN