我试图使用Homebrew安装Nodejs(我使用macOS Sierra 10.12.6),所以我在终端写道:
brew install node
然后又回来了:
Error: /usr/local/Cellar is not writable. You should change the
ownership and permissions of /usr/local/Cellar back to your
user account:
sudo chown -R $(whoami) /usr/local/Cellar
Error: Cannot write to /usr/local/Cellar
然后我写道:
sudo chown -R $(whoami) /usr/local/Cellar
然后又回来了:
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhv] [-R [-H | -L | -P]] :group file ...
之后我尝试了:
sudo chown -R $(whoami) $(brew --prefix)/*
然后又回来了:
chown: /usr/local/Cellar: illegal user name
我可以请你帮忙吗? (注意:用户名是正确的)