我刚刚安装了Homebrew。当我运行brew doctor
时,我得到了这个
Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:
/usr/local/share/man/de
“你应该把它们”称为“它们”是什么意思?有人能解释一下Homebrew究竟想要我做什么吗?
答案 0 :(得分:63)
好的,所以chown
是用于更改文件所有权的unix命令。
Homebrew要求我更改/usr/local/share/man/de
的所有权,以便Homebrew可以写入它。 Homebrew以与我相同的权限运行,因此将自己作为文件的所有者应该可以解决问题。
运行以下内容可解决问题:
sudo chown $(whoami) /usr/local/share/man/de
答案 1 :(得分:4)
检查所有者和权限:
ls -la /usr/local/share/man/ | grep de; ls -la /usr/local/share/man/de/ | grep man1
改变它:
/usr/bin/sudo /usr/bin/chgrp admin /usr/local/share/man/de /usr/local/share/man/de/man1
/usr/bin/sudo /bin/chmod g+rwx /usr/local/share/man/de /usr/local/share/man/de/man1
现在您可以毫无问题地使用brew
; - )
Your system is ready to brew.
答案 2 :(得分:2)
chown用于更改拥有文件所有权的人员。在这种情况下,对sudo
的引用意味着当由常规用户运行时,自制程序无法访问作为超级用户安装的文件,导致这些选项无效,并且如果尝试这样的文件,很可能导致错误或不希望的结果被访问