一、提示/usr/local沒有權(quán)限
1、重啟電腦時按住Command+R兩個按鍵,就能進(jìn)入恢復(fù)模式
2、在菜單中找到終端(Terminal),并打開
3、只想命令csrutil disable,關(guān)閉這個Rootless策略,即SIP
4、執(zhí)行reboot重啟電腦
5、正常開機后執(zhí)行命令sudo chown -R ${whoami} /usr/local賦權(quán)
6、此時可以正常執(zhí)行命令brew update了
7、在按照第一步進(jìn)入恢復(fù)模式,執(zhí)行命令csrutil enable來開啟Rootless策略
二、brew update 無法下載,更新源為中科大鏡像
1、執(zhí)行下面命令即可,內(nèi)置中科大鏡像
/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"
2、其他問題可以查看https://brew.idayer.com