brew install-许可被拒绝(在chown -R`whoami`之后) [英] brew install - permission denied (after chown -R `whoami` )

查看:362
本文介绍了brew install-许可被拒绝(在chown -R`whoami`之后)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ brew install fontconfig
Error: Permission denied - /Library/Caches/Homebrew/Formula/fontconfig.brewing

$ sudo chown -R `whoami` /usr/local

$ brew install fontconfig
Error: Permission denied - /Library/Caches/Homebrew/Formula/fontconfig.brewing

不确定从这里要去哪里.让啤酒博士解决一些现有的问题,但似乎无法解决这个问题.

Not sure where to go from here. Ran brew doctor to fix some existing issues, but can't seem to get past this.

推荐答案

trojanfoe 的答案有所帮助.我没有分配给 Library/Logs 文件夹的权限问题,但是不知为何 Library/Caches/Homebrew 文件夹不存在.因此,我刚刚创建了子文件夹 Formula ,并更改了权限,一切都安装好了.它实际上清除了我遇到的许多错误.

trojanfoe's answer helped. There was a permission issue with the Library/Logs folder that I wasn't assigned to, but somehow the Library/Caches/Homebrew folder didn't exist. So I just created that, the subfolder Formula, and changed the permission and everything installed just fine. It actually cleared up a lot of errors I was having.

谢谢大家.

更新

@fet的一支衬垫很好用.

@fet's one liner works great.

mkdir -p ~/Library/Caches/Homebrew/Formula

这篇关于brew install-许可被拒绝(在chown -R`whoami`之后)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆