问题描述
我一直在尝试使用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:
然后我尝试使用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文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!