安裝Homebrew
首先使用Homebrew官網(wǎng)的安裝shell命令安裝:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
會出現(xiàn)如下錯誤(或許是網(wǎng)絡(luò)或者其他原因):
fatal: unable to access 'https://github.com/Homebrew/brew/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Failed during: git fetch --force origin
試了網(wǎng)上的各種辦法嫉称,改hosts、git config --global http proxy都不行震捣。我們可以使用gtee代理的下載地址:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
下載選擇1,y羡棵。請自行備份。->是否現(xiàn)在開始執(zhí)行腳本(N/Y) y
直至安裝完成會發(fā)現(xiàn),環(huán)境變量也自動配置好了。此時還會提示你設(shè)置默認(rèn)源嚣伐,我選擇5 阿里巴巴的源。
最后brew -v查看下安裝成功了刻撒。
安裝Git
命令查看是否安裝了Git:
git --version?
如果沒有舱呻,安裝命令:
brew install git
遇到報錯茬高,配置下面兩個git目錄就好了
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
安裝adb
brew install --cask android-platform-tools
安裝python
brew install python3