homebrew 無法安裝猖辫,提示不能在根目錄下使用酥泞。
Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
解決思路就是給當(dāng)前用戶添加目錄權(quán)限:
sudo chown -R $(whoami) /usr/local
然后再安裝你需要的軟件通過:
brew install softname
不過,如果還是遇到不能安裝的情況啃憎,就根據(jù)提示內(nèi)容再次給當(dāng)前用戶賦予相應(yīng)的目錄權(quán)限(這里系統(tǒng)會提示)芝囤,你只要根據(jù)提示操作就行了。
在我執(zhí)行上面的命令之后辛萍,我想安裝軟件:
又提示了一下錯誤:
Error: /usr/local/Cellar is not writable. You should change the
ownership and permissions of /usr/local/Cellar back to your
user account:
sudo chown -R $(whoami) /usr/local/Cellar
Error: Cannot write to /usr/local/Cellar
我根據(jù)提示再次執(zhí)行命令:
sudo chown -R $(whoami) /usr/local/Cellar
然后悯姊,再次安裝我需要的軟件,問題解決了贩毕。
長按(或掃碼)識別二維碼悯许,關(guān)注~
陳不二
博客地址: http://www.chenbu2.com
簡書地址: http://www.reibang.com/u/f4874eb81c5b
GitHub地址: https://github.com/ChenBu2
愛學(xué)啊合作講師: http://www.ixuea.com/
公眾號: 陳不2
技術(shù)交流QQ群: 858499698
****歡迎一塊交流學(xué)習(xí)~****
喜歡的朋友記得點(diǎn)贊轉(zhuǎn)發(fā)分享哦!