![](https://img-blog.csdnimg.cn/img_convert/075985cf5a3ca1a4b09ce964cdacf1e3.png)
첫 번째 문제를 먼저 풀어보자
오류: 설치된 개발자 도구가 없습니다.
명령줄 도구 설치:
xcode-select --install
xcode-select --install
그런 다음 추출을 업그레이드하면 경고가 나타납니다. 그런 다음 트리를 다시 설치하십시오.
brew update
brew install tree
다음 오류가 발생합니다.
![](https://img-blog.csdnimg.cn/img_convert/ee394c3aa209140f9302a4c75f2056b0.png)
치명적: git 디렉토리에 없음
오류: 종료 128로 명령 실패: git
터미널에 입력
brew -v
![](https://img-blog.csdnimg.cn/img_convert/2f28cce6a5f0af13e92a57a810a4dbaa.png)
Homebrew 3.6.20
fatal: detected dubious ownership in repository at '/opt/homebrew/Library/Taps/homebrew/homebrew-core'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
Homebrew/homebrew-core (no Git repository)
fatal: detected dubious ownership in repository at '/opt/homebrew/Library/Taps/homebrew/homebrew-cask'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
Homebrew/homebrew-cask (no Git repository)
按照他给出的解决方法输入如下命令
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
![](https://img-blog.csdnimg.cn/img_convert/fdba6f11405249ff9d729c67194ee246.png)
虽然有警告,但是brew install tree成功了