在MacOS上使用Homebrew错误安装git

时间:2020-10-04 18:27:15

标签: git macos terminal homebrew macos-catalina

我已经在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

我不太了解该程序实际上要我说什么。任何有用的帮助。

1 个答案:

答案 0 :(得分:1)

是说运行此命令

(5) ["9", "abcde", "abcde", "abcde", "↵                               Edit              …             Delete ↵                            "]
0: "9"
1: "abcde"
2: "abcde"
3: "abcde"
4: "↵                               Edit                          ↵                               Delete ↵                            "
length: 5
__proto__: Array(0)