User permission changes If creating a new user on unix.

user@iMac bdhtcareers2018.local % brew install gtk+3
Error: homebrew-core is a shallow clone. To `brew update` first run:
git -C “/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core” fetch –unshallow
This restriction has been made on GitHub’s request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core. We don’t do this for you automatically to avoid
repeatedly performing an expensive unshallow operation in CI systems (which
should instead be fixed to not use shallow clones). Sorry for the inconvenience!
Error: The following directories are not writable by your user:
/usr/local/bin
/usr/local/etc/bash_completion.d
/usr/local/share/aclocal
/usr/local/share/doc
/usr/local/share/info
/usr/local/share/locale
/usr/local/share/man/man3
/usr/local/share/man/man5
/usr/local/share/man/man7
/usr/local/share/man/man8
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew/locks
/usr/local/var/log

You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/bin /usr/local/etc/bash_completion.d /usr/local/share/aclocal /usr/local/share/doc /usr/local/share/info /usr/local/share/locale /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7 /usr/local/share/man/man8 /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew/locks /usr/local/var/log

And make sure that your user has write permission.
chmod u+w /usr/local/bin /usr/local/etc/bash_completion.d /usr/local/share/aclocal /usr/local/share/doc /usr/local/share/info /usr/local/share/locale /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7 /usr/local/share/man/man8 /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew/locks /usr/local/var/log

Was this article helpful?

Related Articles

Leave A Comment?