Last login: Mon Mar 7 17:35:51 on console
~ brew update
warning: unable to access '/Users/Jason/.config/git/ignore': Permission denied
warning: unable to access '/Users/Jason/.config/git/attributes': Permission denied
Updated Homebrew from 7f8aa6d to d08692f.
==> New Formulae
cucumber-cpp prometheus znapzend
==> Updated Formulae
afl-fuzz gtk+ orc writerperfect
crystal-lang kafka platformio
dependency-check libvirt sslscan
ghq logtalk syncthing
~我在我的macbook上运行El Capitan,每当我尝试更新自制软件时,我都会收到这些警告。我正在寻找一个如何阻止这些警告发生的解决方案。
发布于 2016-03-08 06:54:07
除非确实需要,否则不应该使用根权限运行brew。运行brew doctor并检查/Users/Jason/.config上的权限
chown -R Jason:staff ~/.config
chmod -R 744 ~/.config发布于 2020-11-13 12:44:46
根据R.Q的回答,以防像我这样的菜鸟碰到这个问题。下面是要复制和粘贴的两行代码:
sudo chown -R $USER ~/.config
sudo chmod -R 744 ~/.config原因是
> brew install somepackage
warning: unable to access '/Users/username/.config/git/attributes': Permission denied看起来像是wisbucky的评论,sudo‘s一些命令,如htop。
一旦你运行了上面的命令,再次运行'sudo htop‘应该不会再有问题了!
https://stackoverflow.com/questions/35855617
复制相似问题