De seus FAQ , isto é para evitar a prática perigosa de ter que executar código arbitrário da internet como root ao instalar pacotes. É um compromisso razoável para a maioria dos usuários - o Homebrew é geralmente usado em máquinas de desenvolvimento de uma única pessoa, não em servidores multiusuários de produção.
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 tochown root wget
?If you need to run Homebrew in a multi-user environment, consider creating a separate user account especially for use of Homebrew.
Por que ele não é instalado apenas em ~
, consulte o /usr/local ? "