为了账号安全,请及时绑定邮箱和手机立即绑定

如何修复自制权限?

如何修复自制权限?

HUWWW 2019-08-28 16:35:55
如何修复自制权限?我已经卸载并安装了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就是这么做的,但显然没有得到上述建议; 你可能会,并且从那里开始总是更好,只有在没有帮助的情况下才寻找非常重要的解决方案。


查看完整回答
反对 回复 2019-08-28
  • 3 回答
  • 0 关注
  • 554 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信