Sudo chown / usr / bin / local does not work continuously to update homebrew

I tried sudo chown $whoami /usr/local/bin, after closing the terminal and reopening the terminal, but he always refuses permission, he does not fix it forever.

shaunstanislaus@Master ~ $ brew upgrade
==> Upgrading 3 outdated packages, with result:
git 2.6.1, mysql 5.6.27, node 4.1.2
==> Upgrading git
Error: Permission denied - /usr/local/share/git-core
+4
source share
1 answer

You will need (change ownership) directories /usr/local/bin /usr/local/share, /usr/local/share/manand /usr/local/share/man/man1.

To do this, do the following:

  • whoami - this will give you your current username
  • sudo chown -R 'username' /usr/local/bin /usr/local/share /usr/local/share/man /usr/local/share/man/man1 (replace username with username from step 1)

Now run brew doctor

You should not see any problems.

Then run brew upgrade

Sophos Anti-Virus, reset , Sophos .

2015 :

https://community.sophos.com/products/free-antivirus-tools-for-desktops/f/17/t/10029

+3

Source: https://habr.com/ru/post/1610466/


All Articles