0

I've tried all of:

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 '{}' \+

And still /usr/local seems to be unwriteable to homebrew installs. For example:

/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

I am tearing my hair out searching forums and like-questions and finding no resolution to this. I even tried different shells, such is the degree of my frustration. Especially given the permissions:

❯ 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

The accepted answer here brew install - permission denied (after chown -R `whoami` ) did not work for me on Yosemite 10.10.3

Community
  • 1
  • 1
Centzon
  • 166
  • 8

1 Answers1

0

The following worked (the homebrew equivalent of "turn it off, and turn it back on again"), but it does not explain wny sudo chown -R `whoami` /usr/local did not.

/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!

Centzon
  • 166
  • 8