今天在使用brew安装openssl时,报了以下错误
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git: Permission denied
==> Tapping homebrew/cask
fatal: could not create work tree dir '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask': Permission denied
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-cask /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask --origin=origin` exited with 128.
通过查找资料,发现需要先执行以下命令:
sudo chown -R $(whoami) $(brew --prefix)/*