更換國內源:官方連接php
cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile' source ~/.bash_profile
安裝多個版本軟件,例如phpgit
brew install php@7.4 brew install php // 默認安裝php8 brew link --overwrite php@7.4 //切換版本
查找軟件bash
brew update brew search xxx
查看軟件安裝狀況url
brew info xxx