我的usr/local目录中没有用于Brew的Cellar文件 [英] There is no Cellar file in my usr/local dir for brew

查看:498
本文介绍了我的usr/local目录中没有用于Brew的Cellar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用brew安装tmux,但是每次我输入brew install tmux时,它都会告诉我:

I have been trying to use brew to install tmux but every time I put in brew install tmux it would tell me:

错误:无法创建/usr/local/Cellar检查您是否有权写入/usr/local

Error: Could not create /usr/local/Cellar Check you have permission to write to /usr/local

然后我尝试使用sudo来执行此操作,但是它没有用,我的来宾不会看到brew不想与root一起使用.我已经确保/usr/local中的所有文件都属于我.我无法更改/usr/local文件;它说:不允许操作".如何解决此问题,以便可以创建Cellar并允许我使用brew安装东西?

I then tried to do it with sudo but it did not work, which I guest would would not seeing that brew does not want to be used with root. I have already made sure that all the files that are in /usr/local belong to me. I can’t change the /usr/local file; it says: "Operation not permitted". How can I fix this so Cellar can be created and allow me to install stuff using brew?

推荐答案

我通过手工创建/usr/local/Cellar目录(以及它可能需要的任何其他目录)并拥有它们来解决它.

I solved it by creating the /usr/local/Cellar directory (and any other directories it may require) by hand and owning them.

sudo mkdir /usr/local/Cellar
sudo chown -R $(whoami) /usr/local/Cellar

然后重新运行命令.

这篇关于我的usr/local目录中没有用于Brew的Cellar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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