sudo chown`whoami`不会影响自制者写入/ usr / local的罪行

时间:2015-05-22 21:48:29

标签: homebrew file-permissions

我已经尝试了所有:

sudo chown -R $USER /usr/local
sudo chown -R :admin /usr/local
sudo chown -R `whoami` /usr/local
sudo chmod -R 777 /usr/local
sudo find /usr/local -perm -200 -exec chmod g+w '{}' \+

仍然/ usr / local似乎对homebrew安装无法写入。例如:

/usr/local master  
❯ brew update
Already up-to-date.

/usr/local master  
❯ brew install fontconfig
==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.11.1.yosemite.
######################################################################## 100.0%
==> Pouring fontconfig-2.11.1.yosemite.bottle.3.tar.gz
Error: Permission denied - /usr/local/etc/fonts/conf.d/10-scale-bitmap-fonts.conf

我正在寻找论坛和类似问题而撕裂我的头发并找不到解决方法。我甚至试过不同的贝壳,这是我的挫败程度。特别是给予权限:

❯ ls -lad /usr/local/etc/fonts/conf.d/10-scale-bitmap-fonts.conf
-rwxrwxrwx@ 1 centzon  admin   1.9K May  5 14:33 /usr/local/etc/fonts/conf.d/10-scale-bitmap-fonts.conf

这里接受的答案brew install - permission denied (after chown -R `whoami` )在Yosemite 10.10.3上对我不起作用

1 个答案:

答案 0 :(得分:0)

以下工作(自制等效的"将其关闭,然后重新打开"),但它没有解释wny sudo chown -R `whoami` /usr/local没有。

/usr/local/etc master  
❯ sudo rm -rf fonts
❯ brew install fontconfig
.
.
.
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall fontconfig`
❯ brew postinstall fontconfig
.
.
.
Re-scanning /Library/Fonts: /usr/local/var/cache/fontconfig/8d7231e6733a9725c81b40e9f55f11b1-le64.cache-4: Permission denied
❯ sudo rm -rf /usr/local/var/cache/fontconfig
❯ brew postinstall fontconfig

DICE!