首页 > 解决方案 > 在带有 Homebrew 错误的 macOS 上安装 git

问题描述

我已经在 macOS 上安装了 HomeBrew,但是当我尝试从命令安装 git 时:

brew install git

终端弹出此错误:

Updating Homebrew...

Error: The following directories are not writable by your user:
/usr/local/share/zsh /usr/local/share/zsh/site-functions

You should change the ownership of these directories to your user.  
sudo chown -R $(whoami) /usr/local/share/zsh
/usr/local/share/zsh/site-functions

我真的不明白程序真正想让我说什么。任何有用的帮助。

标签: gitmacosterminalhomebrewmacos-catalina

解决方案


它是说运行这个命令

sudo chown -R $(whoami) /usr/local/share/zsh /usr/local/share/zsh/site-functions

推荐阅读