我正在嘗試將 mac 上的節點從 10 更新到 12 11.6 (20G165)。
我想使用自制的方式:
brew upgrade node
但是,運行此程式后,我得到:
$ brew upgrade node
Error: The following directories are not writable by your user:
/usr/local/share/man/man5
/usr/local/share/man/man7
好吧,然后我嘗試了 sudo 方式:
sudo brew upgrade node
Password:
Error: 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.
我現在應該怎么做才能修復它?
我可以只授予
/usr/local/share/man/man5
/usr/local/share/man/man7
目錄到我當前的用戶?這樣做有什么風險嗎?
我的自制版本:
Homebrew 3.2.17
Homebrew/homebrew-core (git revision 0e79905a9e5; last commit 2021-10-20)
uj5u.com熱心網友回復:
好吧,我遇到了同樣的問題,并通過提供的命令解決了它,然后出現了錯誤。
sudo chown -R $(whoami) /usr/local/share/man/man5 /usr/local/share/man/man7
并確保您的用戶具有寫入權限。
chmod u w /usr/local/share/man/man5 /usr/local/share/man/man7
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/328947.html
