echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile source ~/.bash_profile
參考:http://mirrors.ustc.edu.cn/help/homebrew-bottles.html
或者:
1、創建 .bash_profile
(1) 啟動終端 (2) 進入當前用戶的home目錄(默認就是): cd ~ (3)輸入touch .bash_profile
2、查看 、編輯 .bash_profile 文件
(1)終端輸入 open -e .bash_profile (如果只是查看,直接使用open .bash_profile) (2)編輯 (3)關閉即可保存修改
3、更新剛配置的環境變量
輸入source .bash_profile
一般在Mac上配置環境變量時經常要創建、編輯 .bash_profile文件。