3 ms·
I think the project overall is great, but I don't understand the dislike of sudo. There's simply nothing wrong with sudo (or su or entering your password in the
by telemachos 17y ago
I think the project overall is great, but I don't understand the dislike of sudo. There's simply nothing wrong with sudo (or su or entering your password in the GUI). OSX is a UNIX (a certified one, in fact), and it follows the principle that some actions require elevated privileges. Installing software system wide has historically required elevated privileges (I think for good reason), and so sudo is necessary to put software into /usr/local. There's nothing bad about using sudo for this.
- blasdel 17y agoI dislike sudo because I want my user-installed stuff to be installed in my damn home directory, not mixed in with system software. I want to me able to install things on a multi-user system without affecting anyone else. Every other non-language-specific package manager blithely assumes that it's the only one on the system, so they assume that nothing is already present, and don't even think about the possibility of independent unprivileged use.
- telemachos 17y agoFair enough, but there are two separate questions here: 1. Where do you want the software? 2. Are elevated privileges required to put the software where you want? If you want to load all your software into $HOME/bin, then more power to you and no sudo is required. However, /usr/local serves an important and valid purpose (to provide packages system-wide), and it should not be available without elevated privileges. (By the way, 'not mixed in with system software' is misleading, since OSX ships with an empty /usr/local. Nothing you put in /usr/local mixes with anything.) Homebrew's official README suggests changing the ownership of /usr/local, and I think that's a terrible idea for multi-user machines. (Having said that, I suppose that many people have single-user machines, and in that case the issue is largely moot.) Finally, a simple way to put software into your $HOME without ever needing sudo is available in most cases: ./configure --prefix=$HOME
- blasdel 17y agoAnd those two separate questions are both ones that no other package manager even bothers to ask! /usr/local does start off empty on OS X, but it's where every random .pkg you download likes to put stuff. You'll get mixing unless every non-app you install comes from a package manager. On FreeBSD every package that didn't ship in the default install goes there. There's a reason that MacPorts uses /opt/local by default.
- mxcl 17y agoIt's not that I hate sudo. But I encourage people not to use it because: 1. You're adding to OS X. It's very important that stuff that gets built definitely didn't touch any files in /usr or /System. Build systems for some projects are big pieces of half arsed software. It's quite a risk — and an unnecessary one at that — to trust them to not break the bit of the system that only Apple fully understands and controls. 2. Homebrew is for developers. I dev software. Mostly I am installing x library and will want to upgrade and fiddle with it readily. Sudo is basically unnecessary for most of Homebrew's packages. Although I agree some stuff should probably not be installed without a sudo. But with Homebrew at least you can decide which to do on a per package basis. Also, this isn't rationale, but it's still worth pointing out: most people install software on Mac without a sudo anyway (eg. almost everything in /Applications), so it's not such a big step to suggest you do the same for the handful of tools you need that OS X doesn't provide.