Live data from Hacker News

El Capitan and Homebrew

github.com

21–30 of 298 posts

Re: El Capitan and Homebrew

#21
post #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?

Actually it sounds like you will need to run this/restore permissions after every future OS X update.

Re: El Capitan and Homebrew

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

For me, because it is the default, and there is section in homebrew FAQ tell that many build scripts breaks if it isn't in `/usr/local/`.

Re: El Capitan and Homebrew

#23
post #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.

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 with sudo, but I don't want to use unsupported methods.

Re: El Capitan and Homebrew

#25
post #13
post #9

Earlier quoted context omitted.

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.

I can't be sure obviously, but if it's done once by the installer, there's no reason to assume it won't ever do it again. So in the worst case, you'll have to re-chown every time you install an update.

Or you don't chown and run brew as root.

Re: El Capitan and Homebrew

#26
post #21
post #19

Earlier quoted context omitted.

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?

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?

Re: El Capitan and Homebrew

#28
post #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?

Mostly because of my (perhaps irrational) OCD in not wanting to touch global system paths or files, even though under FHS /usr/local is where you're supposed to install manually-managed libraries and binaries. I believe Homebrew likes to have its path owned by you instead of root, so I think it makes more sense to have stuff that's going to be owned by me to be in my home folder rather than /usr/local.

Re: El Capitan and Homebrew

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

That's a common Unix practice to put system-wide stuff manually managed (as opposed to managed by the OS/distribution) in /usr/local.

Re: El Capitan and Homebrew

#30
post #23
post #12

Earlier 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…

You can create an admin account and use that ad indirection for dealing With homebrew
Post reply on HN