From their FAQ, this is to avoid the dangerous practice of having to run arbitrary code off the internet as root when installing packages. It's a reasonable compromise for most users - Homebrew's generally used on a single person's development machine, not production multi-user servers.
Homebrew is designed to work without using sudo. You can decide to use it but we strongly recommend not to do so. If you have used sudo and run into a bug then it is likely to be the cause. Please don’t file a bug report unless you can reproduce it after reinstalling Homebrew from scratch without using sudo.
You should only ever sudo a tool you trust. Of course, you can trust Homebrew ;) But do you trust the multi-megabyte Makefile that Homebrew runs? Developers often understand C++ far better than they understand make syntax. It’s too high a risk to sudo such stuff. It could break your base system, or alter it subtly.
And indeed, we’ve seen some build scripts try to modify /usr
even when the prefix was specified as something else entirely.
Did you chown root /Applications/TextMate.app
? Probably not. So is it that important to chown root wget
?
If you need to run Homebrew in a multi-user environment, consider creating a separate user account especially for use of Homebrew.
For why it doesn't just install in your ~
, see the earlier FAQ question "Why does Homebrew prefer I install to /usr/local
?".