git - 在带有 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
我真的不明白程序真正想让我说什么。任何有用的帮助。
解决方案
它是说运行这个命令
sudo chown -R $(whoami) /usr/local/share/zsh /usr/local/share/zsh/site-functions
推荐阅读
- c# - 生命周期范围是否包含对非一次性组件的引用?
- elasticsearch - ElasticSearch,多索引搜索
- flutter - TextEditingController 返回 null ,不考虑我在文本字段中键入的输入
- c - 如何在平方根函数中使用存储为字符的数字?
- javascript - 如何通过javascript中的if语句更改输入ID内的值
- python - 脚本 sqlformat.exe 安装在目录中,该目录不在 PATH 上
- r - R中是否有一个函数来填充变量中的缺失数据
- kubernetes - 具有单个 ALB、多个命名空间和外部 DNS 的 EKS 入口
- javascript - 将状态数据传递给其他组件
- clojure - 在 JNI 创建的线程中从 Clojure 调用 Java 互操作时如何防止 ClassNotFoundException?