如何修復自制權限?我已經卸載并安裝了Homebrew 3次,因為它似乎永遠不允許我安裝任何東西,因為它在大多數安裝結束時拒絕我的權限。作為一個例子,我將發布我目前面臨的這個libjpeg下載場景。我嘗試安裝libjpeg并獲取:$ brew install libjpeg==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/jpeg-8d.mountain_lion.bottle.1.tar.gzAlready downloaded: /Library/Caches/Homebrew/jpeg-8d.mountain_lion.bottle.1.tar.gz==> Pouring jpeg-8d.mountain_lion.bottle.1.tar.gzWarning: Could not link jpeg. Unlinking...Error: The brew link step did not complete successfullyThe formula built, but is not symlinked into /usr/localYou can try again using `brew link jpeg'Error: Permission denied - /usr/local/opt/jpeg'brew link jpeg'導致Error: Permission denied - /usr/local/opt/jpeg這是我的釀酒醫生所讀的內容$ brew doctorWarning: "config" scripts exist outside your system or Homebrew directories../configure scripts often look for *-config scripts to determine ifsoftware packages are installed, and what additional flags to use whencompiling and linking.Having additional scripts in your path can confuse software installed viaHomebrew if the config script overrides a system or Homebrew providedscript of the same name. We found the following "config" scripts:/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-configWarning: You have unlinked kegs in your CellarLeaving kegs unlinked can lead to build-trouble and cause brews that depend onthose kegs to fail to run properly once built. Run brew link on these:jpeg這個許可問題一直使得任何事情都無法使用brew,我真的很感激任何建議。
3 回答

冉冉說
TA貢獻1877條經驗 獲得超1個贊
作為像我一樣在這里落地的人的第一選擇,請按照以下建議你做的事情:
brew doctor
這是最安全的道路,除其他外,它建議我:
sudo chown -R $(whoami) /usr/local
這解決了權限問題。
OP就是這么做的,但顯然沒有得到上述建議; 你可能會,并且從那里開始總是更好,只有在沒有幫助的情況下才尋找非常重要的解決方案。
添加回答
舉報
0/150
提交
取消