macOS 10.12.6 安裝homebrew


系統環境

教程

iTerm2 + Oh My Zsh 打造舒適終端體驗

問題

在安裝Homebrew這一步報錯

Press RETURN to continue or any other key to abort
==> Installing the Command Line Tools (expect a GUI popup):
==> /usr/bin/sudo /usr/bin/xcode-select --install
Password:
xcode-select: note: install requested for command line developer tools
Press any key when the installation has completed.
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools'
Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools

這是因為本機沒有安裝xcode開發套裝。而Xcode Command Line Tools 是套裝的一部分。
既然不做蘋果應用程序開發,我們不需要安裝完整的xcode,
只需要下載Xcode Command Line Tools即可。
參考:

  1. https://railsapps.github.io/xcode-command-line-tools.html
  2. https://stackoverflow.com/questions/50965714/installing-homebrew-on-mac-os-sierra-10-12-6

通過$ xcode-select --install下載會非常慢,所以直接訪問 https://developer.apple.com/downloads/more 下載dmg文件

下載

提高brew速度

https://juejin.im/post/5d503ebef265da03cf7a7f48#heading-6


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM