Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@ldong

This comment has been minimized.

Copy link

@ldong ldong commented Sep 22, 2015

sudo chown -R $(whoami) /usr/local

@timothylombrana

This comment has been minimized.

Copy link

@timothylombrana timothylombrana commented Sep 29, 2015

Thank you for your help.

@wealthychef1

This comment has been minimized.

Copy link

@wealthychef1 wealthychef1 commented Mar 12, 2016

Um, sounds great, unless there are TWO users on your system, and the other one wants to use brew as well. Then what? This is horrible and makes me think I should definitely not use brew.

@cedx

This comment has been minimized.

Copy link

@cedx cedx commented Mar 14, 2016

sudo chown -R $(whoami) /usr/local : a bad idea too ! I don't see why sudoing Homebrew is a worst idea.

@ryanjsfx

This comment has been minimized.

Copy link

@ryanjsfx ryanjsfx commented Jul 26, 2016

sudo chown -R $(whoami) /usr/local is a terrible idea! I'd rather just sudo when installing; I'm switching to macports

@aleczadikian

This comment has been minimized.

Copy link

@aleczadikian aleczadikian commented Dec 30, 2016

I don't understand why this package manager shouldn't run as root like all other package managers do. Can we just get an option to run brew as root like there used to be (chown'ing brew to root)? I can't install anything without destroying all my permissions. I switched to MacPorts long ago just because of this, but a few things require Homebrew still.

@aleczadikian

This comment has been minimized.

Copy link

@aleczadikian aleczadikian commented Dec 30, 2016

Here's what I did to force Homebrew to run as root:
cd /usr/local/Homebrew/Library/Homebrew
Edit brew.sh, look for "Running Homebrew as root is extremely dangerous and no longer supported" (line 250 in my version), delete the check.

@EmadMokhtar

This comment has been minimized.

Copy link

@EmadMokhtar EmadMokhtar commented Mar 1, 2017

Perfect it worked for other error, but it is related to Permission denied.

@065673

This comment has been minimized.

Copy link

@065673 065673 commented Jun 12, 2017

Before
~/scripts/ripe-atlas-community-contrib$ brew link --overwrite python
Linking /usr/local/Cellar/python/2.7.13... Error: Permission denied - /usr/local/Frameworks
After
sudo chown -R $(whoami) /usr/local/
Result
brew link --overwrite python
Linking /usr/local/Cellar/python/2.7.13... 321 symlinks created == πŸ‘

@aljex

This comment has been minimized.

Copy link

@aljex aljex commented Jul 14, 2017

"I switched to MacPorts long ago just because of this" Me too.

It is utterly insane that a package/ports manager actually instructs and requires something so wrong. The justifications cited in their faq essentially serves as self-documenting automatic disqualification from any conversation about system design and operation. That whole section of the faq is just one wrong statement built on top of a previous wrong statement, built on yet an earlier wrong statement. The faq should serve as proof why not to touch any software produced by anyone who produced that faq.

@pointum

This comment has been minimized.

Copy link

@pointum pointum commented Oct 21, 2017

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Nov 1, 2017

@pointum
it worked well for us.

@giovanigenerali

This comment has been minimized.

Copy link

@giovanigenerali giovanigenerali commented Nov 13, 2017

@pointum thanks!

@johnnymatthews

This comment has been minimized.

Copy link

@johnnymatthews johnnymatthews commented Nov 14, 2017

@pointum, running sudo install -d -o ($whoami) -g admin /usr/local/Frameworks allowed me to propely link my Python install. Thanks.

@mihkell

This comment has been minimized.

Copy link

@mihkell mihkell commented Nov 16, 2017

sudo chown -R $(whoami) $(brew --prefix)/* is the how todo it in High Sierra

@sidepelican

This comment has been minimized.

Copy link

@sidepelican sidepelican commented Nov 19, 2017

@pointum thanks!

@Sam-Butler

This comment has been minimized.

Copy link

@Sam-Butler Sam-Butler commented Nov 28, 2017

@pointum that did the trick

@qiuhuaqi

This comment has been minimized.

Copy link

@qiuhuaqi qiuhuaqi commented Nov 29, 2017

@pointum Thanks for the tip, sudo install -d -o $(whoami) -g admin worked for me too. Could you (or someone) explain what this line does? (yep I ran a sudo command before understanding what it is ...)

@iSteveyang

This comment has been minimized.

Copy link

@iSteveyang iSteveyang commented Dec 1, 2017

@pointum Thanks!

@yfenes

This comment has been minimized.

Copy link

@yfenes yfenes commented Dec 8, 2017

@pointum Thanks! It worked for me too.

@kode54

This comment has been minimized.

Copy link

@kode54 kode54 commented Dec 12, 2017

Bailed to MacPorts.

@annjawn

This comment has been minimized.

Copy link

@annjawn annjawn commented Dec 19, 2017

@pointum that worked for me too. Thank you!

@aether2501

This comment has been minimized.

Copy link

@aether2501 aether2501 commented Dec 19, 2017

after upgrading to High Sierra, uninstall brew & re-install with the below command to ensure the linking to the brew github and associated permissions to the local folder work correctly:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

@ThuggishNuggets

This comment has been minimized.

Copy link

@ThuggishNuggets ThuggishNuggets commented Dec 21, 2017

@aether2501 wrote:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This worked perfectly. No mucking around with permissions myself, just reinstalled Homebrew and it works!

Sucks that brew doctor isn't able to fix this.

@MacMeDan

This comment has been minimized.

Copy link

@MacMeDan MacMeDan commented Jan 1, 2018

@aether2501 is my hero.

@zhjuncai

This comment has been minimized.

Copy link

@zhjuncai zhjuncai commented Jan 2, 2018

@pointum save my morning.... thanks

@AnalyzePlatypus

This comment has been minimized.

Copy link

@AnalyzePlatypus AnalyzePlatypus commented Jan 3, 2018

@syokensyo

This comment has been minimized.

Copy link

@syokensyo syokensyo commented Jan 10, 2018

@aether2501
awesome solution!

@alexdd55

This comment has been minimized.

Copy link

@alexdd55 alexdd55 commented Jan 10, 2018

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
this works perfect. thanks!

@j3pic

This comment has been minimized.

Copy link

@j3pic j3pic commented Jan 12, 2018

The procedure above didn't work for me. All permissions seemed correct as far as I could tell with /bin/ls. My solution was to edit /usr/local/Homebrew/Library/Homebrew/brew.sh and comment out the line that checks if it's running as root.

@idevz

This comment has been minimized.

Copy link

@idevz idevz commented Jan 14, 2018

@pointum thanks!

@goelmk

This comment has been minimized.

Copy link

@goelmk goelmk commented Jan 19, 2018

@pointum thanks!

@rohan20

This comment has been minimized.

Copy link

@rohan20 rohan20 commented Jan 20, 2018

@aether2501 Thanks alot!

@bitakou

This comment has been minimized.

Copy link

@bitakou bitakou commented Jan 24, 2018

a command from @pointum really helps!
Thank you <3

@emanoelopes

This comment has been minimized.

Copy link

@emanoelopes emanoelopes commented Jan 25, 2018

@pointum thanks!

@DanDvoracek

This comment has been minimized.

Copy link

@DanDvoracek DanDvoracek commented Jan 27, 2018

Thanks @pointum !

@gauravparvadiya

This comment has been minimized.

Copy link

@gauravparvadiya gauravparvadiya commented Feb 15, 2018

Thanks @pointum

@stellamiranda

This comment has been minimized.

Copy link

@stellamiranda stellamiranda commented Feb 20, 2018

thanks @pointum !

@Rondim

This comment has been minimized.

Copy link

@Rondim Rondim commented Feb 27, 2018

thanks @pointum

@Linesmerrill

This comment has been minimized.

Copy link

@Linesmerrill Linesmerrill commented Mar 2, 2018

Thanks @mihkell

@samhigh

This comment has been minimized.

Copy link

@samhigh samhigh commented Mar 16, 2018

@mihkell thanks!

@gregaeq

This comment has been minimized.

Copy link

@gregaeq gregaeq commented Mar 20, 2018

@mihkell & @pointum Thanks

My solution was similar, my directory /usr/local/Frameworks didn't exist yet, I was able to just sudo mkdir Frameworks && sudo chown $(whoami) Frameworks/. After that, running brew link python worked.

@salmanwaheed

This comment has been minimized.

Copy link

@salmanwaheed salmanwaheed commented Mar 26, 2018

πŸ‘

@rjforbes

This comment has been minimized.

Copy link

@rjforbes rjforbes commented Apr 12, 2018

@gregaeq I did the same with success. OSX 10.13.3

@profmocs

This comment has been minimized.

Copy link

@profmocs profmocs commented Apr 25, 2018

I just changed the group recursively of /usr/local to wheel, made /usr/local and it contents group writable, and added myself to the wheel group.

@FumiyaShibusawa

This comment has been minimized.

Copy link

@FumiyaShibusawa FumiyaShibusawa commented May 6, 2018

@gregaeq thanks, it worked with that!

@christianwgd

This comment has been minimized.

Copy link

@christianwgd christianwgd commented May 9, 2018

I agree with aljex, this speaks for itself:

iMac:~ username$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This script requires the user username to be an Administrator.
iMac:~ username$ sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Password:
Don't run this as root!
iMac:~ username$
@gabriel-a

This comment has been minimized.

Copy link

@gabriel-a gabriel-a commented May 15, 2018

/usr/local can no longer be chowned in High Sierra.

I tried this.
sudo chown -R $(whoami) $(brew --prefix)/*

@caiocesarf

This comment has been minimized.

Copy link

@caiocesarf caiocesarf commented May 15, 2018

thanks! @pointum

@chuckiefan

This comment has been minimized.

Copy link

@chuckiefan chuckiefan commented May 21, 2018

@pointum Thank you, it works for me!

@Jkim55

This comment has been minimized.

Copy link

@Jkim55 Jkim55 commented Jun 5, 2018

@aether2501, thanks!!

@manideepak5298

This comment has been minimized.

Copy link

@manideepak5298 manideepak5298 commented Jun 9, 2018

@aether2501, thanks. It really helped me.

@PhyllisWong

This comment has been minimized.

Copy link

@PhyllisWong PhyllisWong commented Jun 19, 2018

Didn't work for me:
sudo chown -R $(whoami) /usr/local

However this command did:
sudo chown -R $(whoami) $(brew --prefix)/*

@OxyFlax

This comment has been minimized.

Copy link

@OxyFlax OxyFlax commented Jun 29, 2018

Thank you @PhyllisWong, it worked like a charm

@aareeph

This comment has been minimized.

Copy link

@aareeph aareeph commented Jul 7, 2018

@pointum your solutioni worked like a charm! Thanks! :)

@brannonh

This comment has been minimized.

Copy link

@brannonh brannonh commented Jul 9, 2018

@aether2501's solution worked perfectly for me. Reinstalling Homebrew seems like the best option here.

@RoRroland

This comment has been minimized.

Copy link

@RoRroland RoRroland commented Jul 10, 2018

this one works for me. sudo chown -R $(whoami) $(brew --prefix)/*

@raviranjan0631

This comment has been minimized.

Copy link

@raviranjan0631 raviranjan0631 commented Jul 20, 2018

it was due to npm cache error and it can be solved by
clearing the cache
"npm cache clear --force"

@lanhongvp

This comment has been minimized.

Copy link

@lanhongvp lanhongvp commented Aug 23, 2018

Thanks @mihkell.
sudo chown -R $(whoami) $(brew --prefix)/*
This finally works.

@danilodelponte

This comment has been minimized.

Copy link

@danilodelponte danilodelponte commented Sep 17, 2018

I had this issue when installing python:

Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks
Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

Then I ran brew doctor and got this:

Warning: The following directories do not exist:
/usr/local/sbin
/usr/local/Frameworks

You should create these directories and change their ownership to your account.
  sudo mkdir -p /usr/local/sbin /usr/local/Frameworks
  sudo chown -R $(whoami) /usr/local/sbin /usr/local/Frameworks

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  python

The folders really didn't exist, as @gregaeq pointed out (thanks!!), after running those lines it worked πŸ‘

@SuriyaMohan89

This comment has been minimized.

Copy link

@SuriyaMohan89 SuriyaMohan89 commented Oct 12, 2018

Saved me! Thanks

@Kendysond

This comment has been minimized.

Copy link

@Kendysond Kendysond commented Oct 21, 2018

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

This worked for me. Thanks @pointum

@naivefun

This comment has been minimized.

Copy link

@naivefun naivefun commented Oct 30, 2018

try sudo chown -R $(whoami) $(brew --prefix)/*

@Njarif

This comment has been minimized.

Copy link

@Njarif Njarif commented Nov 20, 2018

@aether2501 wrote:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This worked perfectly. No mucking around with permissions myself, just reinstalled Homebrew and it works!

Sucks that brew doctor isn't able to fix this.

@aether2501 wrote:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This worked perfectly. No mucking around with permissions myself, just reinstalled Homebrew and it works!

Sucks that brew doctor isn't able to fix this.

after upgrading to High Sierra, uninstall brew & re-install with the below command to ensure the linking to the brew github and associated permissions to the local folder work correctly:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Thank you for this. Saved me after 8 hours of a problematic first install.

@msimonc

This comment has been minimized.

Copy link

@msimonc msimonc commented Nov 21, 2018

Worked for me on Mac OSX:
cd /usr/local
ls -l Homebrew (to get the owner and group)
sudo mkdir Frameworks
sudo chown owner:group Frameworks

@ignoracenfly

This comment has been minimized.

Copy link

@ignoracenfly ignoracenfly commented Nov 21, 2018

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

nice

@Bas-Schrodinger

This comment has been minimized.

Copy link

@Bas-Schrodinger Bas-Schrodinger commented Nov 22, 2018

after upgrading to High Sierra, uninstall brew & re-install with the below command to ensure the linking to the brew github and associated permissions to the local folder work correctly:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This worked perfect for me! I just uninstalled and reinstalled brew & now it works fine.

@rakshitsoni02

This comment has been minimized.

Copy link

@rakshitsoni02 rakshitsoni02 commented Nov 28, 2018

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
this works perfect. thanks!

Worked thanks

@LiWenGu

This comment has been minimized.

Copy link

@LiWenGu LiWenGu commented Dec 1, 2018

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Worked thanks

@kyihtooag

This comment has been minimized.

Copy link

@kyihtooag kyihtooag commented Dec 6, 2018

Thanks @pointum

@Aldizh

This comment has been minimized.

Copy link

@Aldizh Aldizh commented Dec 13, 2018

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Totally agree, worked like a charm!

@calramen

This comment has been minimized.

Copy link

@calramen calramen commented Dec 20, 2018

Hi all - just upgraded to High Sierra recently. I found this thread while trying to solve the permissions issue with brew.

I tried uninstalling brew in hopes to reinstall it again to get rid of the permissions thing, but even that had errors:

computername β–Ά userme β–Ά /usr/local/Homebrew β–Ά β‘‚ stable + β–Ά ο£Ώ β–Ά ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Warning: This script will remove:
/Users/userme/Library/Caches/Homebrew/
/Users/userme/Library/Logs/Homebrew/
/usr/local/Cellar/
/usr/local/Homebrew/
/usr/local/Homebrew/.github/
/usr/local/Homebrew/CHANGELOG.md
/usr/local/Homebrew/CODE_OF_CONDUCT.md
/usr/local/Homebrew/LICENSE.txt
/usr/local/Homebrew/Library/
/usr/local/Homebrew/Library/Homebrew/test/.bundle/config
/usr/local/Homebrew/bin/brew
/usr/local/Homebrew/completions/
/usr/local/Homebrew/docs/
/usr/local/Homebrew/manpages/
/usr/local/bin/brew -> /usr/local/Homebrew/bin/brew
/usr/local/etc/bash_completion.d/brew -> /usr/local/Homebrew/completions/bash/brew
/usr/local/share/doc/homebrew -> /usr/local/Homebrew/docs
/usr/local/share/man/man1/brew-cask.1 -> /usr/local/Homebrew/manpages/brew-cask.1
/usr/local/share/man/man1/brew.1 -> /usr/local/Homebrew/manpages/brew.1
/usr/local/share/zsh/site-functions/_brew -> /usr/local/Homebrew/completions/zsh/_brew
/usr/local/share/zsh/site-functions/_brew_cask -> /usr/local/Homebrew/completions/zsh/_brew_cask
/usr/local/var/homebrew/
Are you sure you want to uninstall Homebrew? This will remove your installed packages! [y/N] y
==> Removing Homebrew installation...
==> Removing empty directories...
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -name .DS_Store -delete
Password:
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -depth -type d -empty -exec rmdir {} ;
rmdir: /usr/local/opt: Permission denied
rmdir: /usr/local/var: Permission denied
rmdir: /usr/local/Cellar: Permission denied
rmdir: /usr/local/Homebrew: Permission denied
rmdir: /usr/local/Frameworks: Permission denied
==> /usr/bin/sudo rmdir /usr/local/Homebrew
rmdir: /usr/local/Homebrew: Permission denied
Warning: Failed during: /usr/bin/sudo rmdir /usr/local/Homebrew
Warning: Homebrew partially uninstalled (but there were steps that failed)!
To finish uninstalling rerun this script with sudo.
The following possible Homebrew files were not deleted:
/usr/local/bin/
/usr/local/.com.apple.installer.keep
/usr/local/jamf/
/usr/local/include/
/usr/local/sbin/
/usr/local/remotedesktop/
/usr/local/etc/
/usr/local/Homebrew/
/usr/local/var/
/usr/local/McAfee/
/usr/local/lib/
/usr/local/opt/
/usr/local/Frameworks/
/usr/local/Cellar/
/usr/local/share/
You may wish to remove them yourself.

@jasanchezo

This comment has been minimized.

Copy link

@jasanchezo jasanchezo commented Jan 3, 2019

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Great! Work in Mojave too. Regards!

@skiabox

This comment has been minimized.

Copy link

@skiabox skiabox commented Jan 4, 2019

@jasanchezo Awesome man!!!I confirm that this command works in Mojave!

@taiji85

This comment has been minimized.

Copy link

@taiji85 taiji85 commented Jan 5, 2019

after upgrading to High Sierra, uninstall brew & re-install with the below command to ensure the linking to the brew github and associated permissions to the local folder work correctly:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Thank you! Worked for me as well. - Mojave 10.14.2

@inarli

This comment has been minimized.

Copy link

@inarli inarli commented Jan 14, 2019

Thanks.

@wangmeijian

This comment has been minimized.

Copy link

@wangmeijian wangmeijian commented Jan 16, 2019

Thanks.

@marcstraka

This comment has been minimized.

Copy link

@marcstraka marcstraka commented Jan 23, 2019

This worked for me as I could now chown all of /usr/local/

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

@ctechdev

This comment has been minimized.

Copy link

@ctechdev ctechdev commented Jan 26, 2019

No need to chown the whole /usr/local if brew only fails to create a single directory.
For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Great! Work in Mojave too. Regards!

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Work fine for me on Mojave, i used
sudo chown -R $(whoami) /usr/local/Homebrew

@g4d

This comment has been minimized.

Copy link

@g4d g4d commented Jan 30, 2019

after upgrading to High Sierra, uninstall brew & re-install with the below command to ensure the linking to the brew github and associated permissions to the local folder work correctly:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

ftw. years later. thanks.

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Feb 3, 2019

sudo chown -R $(whoami) /usr/local

It works for me

@francois-roget

This comment has been minimized.

Copy link

@francois-roget francois-roget commented Feb 4, 2019

Worked for me!

@swateek

This comment has been minimized.

Copy link

@swateek swateek commented Feb 5, 2019

sudo chown -R $(whoami) /usr/local/*

The slash and start was needed in my case.

@begrafx

This comment has been minimized.

Copy link

@begrafx begrafx commented Feb 6, 2019

I used this, and it seems to have helped, HOWEVER the system seems to be slower now. BREW commands seem to have more lag to them. Any ideas how to fix this?

@Tmstone

This comment has been minimized.

Copy link

@Tmstone Tmstone commented Feb 12, 2019

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

I tried the fix above today to create a brew python link and it worked. Thanks @pointum

@jadibrahim

This comment has been minimized.

Copy link

@jadibrahim jadibrahim commented Mar 11, 2019

No need to chown the whole /usr/local if brew only fails to create a single directory.
For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

I tried the fix above today to create a brew python link and it worked. Thanks @pointum

I'VE BEEN DEALING WITH THIS FOR SOOO LONG!!! Thank you so much man, really appreciate you sharing this!!

@mouuuton

This comment has been minimized.

Copy link

@mouuuton mouuuton commented Mar 12, 2019

Thanks @pointum !

@Bloodsucker

This comment has been minimized.

Copy link

@Bloodsucker Bloodsucker commented Mar 12, 2019

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
this works perfect. thanks!

Worked thanks

THIS is the correct solution. You need to update/install homebrew.

@andfinally

This comment has been minimized.

Copy link

@andfinally andfinally commented Mar 13, 2019

Thanks @Bloodsucker, worked nicely for me, no need to reinstall Brew packages.

@dresean

This comment has been minimized.

Copy link

@dresean dresean commented Mar 15, 2019

sudo chown -R $(whoami) $(brew --prefix)/*

Re: High Sierra:
This worked for me, thanks @mihkell!

@momise92

This comment has been minimized.

Copy link

@momise92 momise92 commented Mar 18, 2019

npm cache clear --force

Thanks you this work for me

@maxwellmckinnon

This comment has been minimized.

Copy link

@maxwellmckinnon maxwellmckinnon commented Mar 21, 2019

Why is this the solution instead of making brew install as sudo properly?

I guess brew users have no more than one user on their system?

@DeterminedNow

This comment has been minimized.

Copy link

@DeterminedNow DeterminedNow commented Mar 24, 2019

Thanks @aether2501 for your solution to this problem. I’m trying to comply with the requirements for getting the multiplatform Boden framework installed on Mac OS Mojave, for Android builds.
The third and last step was to run,
brew install python3 cmake but it gave,
Error: An unexpected error occurred during the brew link step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks

I ran that script you recommended,

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

It worked perfectly.

Again, I ran, brew install python3 cmake, but got

Warning: python 3.7.2_2 is already installed, it's just not linked
You can use brew link python to link this version.

So, ran
brew link python getting:
Linking /usr/local/Cellar/python/3.7.2_2... 20 symlinks created.
Success, I suppose :-)

@mhijack

This comment has been minimized.

Copy link

@mhijack mhijack commented Mar 25, 2019

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Thank you!!!!

@Ivarssonjorgen

This comment has been minimized.

Copy link

@Ivarssonjorgen Ivarssonjorgen commented Mar 26, 2019

@pointum Thanks! It worked. Problem solved!

@cshif

This comment has been minimized.

Copy link

@cshif cshif commented Apr 5, 2019

@pointum It worked! Thanks a lot!!!

@vuduychuong

This comment has been minimized.

Copy link

@vuduychuong vuduychuong commented Apr 7, 2019

High Sierra:
This worked for me, thanks!

@estelondono

This comment has been minimized.

Copy link

@estelondono estelondono commented Apr 8, 2019

@pointum Thank you! It worked like a charmed.

@frozenfung

This comment has been minimized.

Copy link

@frozenfung frozenfung commented Apr 10, 2019

@j3pic
thanks

@jpinnix

This comment has been minimized.

Copy link

@jpinnix jpinnix commented Apr 10, 2019

@pointum Thank you!

https://gist.github.com/irazasyed/7732946#gistcomment-2235469 is the direct link to his comment

Also, if you use fish it doesn't need the $ before (whoami):

sudo install -d -o (whoami) -g admin /usr/local/Frameworks

@alexanderslash

This comment has been minimized.

Copy link

@alexanderslash alexanderslash commented Apr 17, 2019

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

this worked for me in this case.

@DiddyKong47

This comment has been minimized.

Copy link

@DiddyKong47 DiddyKong47 commented Apr 22, 2019

Thank You [High Sierra(17G65)]
sudo install -d -o $(whoami) -g admin /usr/local/Frameworks
worked perfectly

then, just had to relink with
brew link python

@Ayesha-Mulla

This comment has been minimized.

Copy link

@Ayesha-Mulla Ayesha-Mulla commented Apr 24, 2019

if you are using terminal,
login with local user, and then you can run this script

sudo chown -R $USER <directory_project>

@Jordanairwave

This comment has been minimized.

Copy link

@Jordanairwave Jordanairwave commented May 2, 2019

@pointum You command worked for me, Thank you.

@bowencool

This comment has been minimized.

Copy link

@bowencool bowencool commented May 7, 2019

@pointum Thank you.

@Monil200

This comment has been minimized.

Copy link

@Monil200 Monil200 commented May 7, 2019

did sudo on the 2 directories it was complaining for

sudo chmod u+w /usr/local/share/man/man8
sudo chmod u+w /usr/local/lib/pkgconfig

boom success

@farikarimi

This comment has been minimized.

Copy link

@farikarimi farikarimi commented May 8, 2019

@aether2501 thanks! wasn't sure about messing with the permissions myself either, and this solved the problem!

@fhefh2015

This comment has been minimized.

Copy link

@fhefh2015 fhefh2015 commented May 14, 2019

Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks
Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

How to solve:

sudo mkdir /usr/local/Frameworks
sudo chown $(whoami):admin /usr/local/Frameworks

It works fine for me

@Payel-Dutta28

This comment has been minimized.

Copy link

@Payel-Dutta28 Payel-Dutta28 commented May 16, 2019

@pointum
it worked well for me. Thanks!!

@ryan57bh

This comment has been minimized.

Copy link

@ryan57bh ryan57bh commented May 19, 2019

Thank you a lot! This works for me. High Sierra 10.13.6

@anandgargate

This comment has been minimized.

Copy link

@anandgargate anandgargate commented May 23, 2019

Thanks @pointum. Works for me.

@tqwhite

This comment has been minimized.

Copy link

@tqwhite tqwhite commented May 31, 2019

Worked for me on Mojave. It's also true that you don't need to do the whole directory. No apparent harm to doing it all though.

@dyangqaq

This comment has been minimized.

Copy link

@dyangqaq dyangqaq commented Jun 21, 2019

Thanks @pointum

@marcinkornek

This comment has been minimized.

Copy link

@marcinkornek marcinkornek commented Jun 26, 2019

Thanks @pointum

@benoitMariaux

This comment has been minimized.

Copy link

@benoitMariaux benoitMariaux commented Jun 29, 2019

thanks @pointum

@amelialin

This comment has been minimized.

Copy link

@amelialin amelialin commented Jul 9, 2019

thanks @mikhell!

@yoksel

This comment has been minimized.

Copy link

@yoksel yoksel commented Jul 23, 2019

@pointum Thanks!

@cemdede

This comment has been minimized.

Copy link

@cemdede cemdede commented Jul 30, 2019

Thanks @mihkell.
sudo chown -R $(whoami) $(brew --prefix)/*
Worked for High Sierra, installed xml2 to RedHat server

This was causing problems while installing R's 'tidyverse' package

@hrytskivr

This comment has been minimized.

Copy link

@hrytskivr hrytskivr commented Aug 3, 2019

Thank you, just works

@YEMEAC

This comment has been minimized.

Copy link

@YEMEAC YEMEAC commented Sep 16, 2019

thank you!

@MichaelMichaelMichaelMichaelMichael

This comment has been minimized.

Copy link

@MichaelMichaelMichaelMichaelMichael MichaelMichaelMichaelMichaelMichael commented Sep 16, 2019

Thanks, this saved my a.. :)

@sieroniekuggy

This comment has been minimized.

Copy link

@sieroniekuggy sieroniekuggy commented Sep 18, 2019

sudo chown -R $(whoami) /usr/local/sbin /usr/local/Frameworks

this one worked for me. thanks!

@t1jani

This comment has been minimized.

Copy link

@t1jani t1jani commented Sep 19, 2019

worked perfectly

@petzi53

This comment has been minimized.

Copy link

@petzi53 petzi53 commented Sep 21, 2019

On Mojave:
sudo chown -R $(whoami) /usr/local
Didn't work for me.

However this command did:
sudo chown -R $(whoami) $(brew --prefix)/*

@Agusnez

This comment has been minimized.

Copy link

@Agusnez Agusnez commented Oct 1, 2019

On Mojave:
sudo chown -R $(whoami) /usr/local
Didn't work for me.

However this command did:
sudo chown -R $(whoami) $(brew --prefix)/*

πŸ”THIS πŸ€©πŸ™Œ

@mattdamon108

This comment has been minimized.

Copy link

@mattdamon108 mattdamon108 commented Oct 2, 2019

@pointum Thanks!

@davdpwr

This comment has been minimized.

Copy link

@davdpwr davdpwr commented Oct 3, 2019

sudo chown -R $(whoami) /usr/local/Homebrew

πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”πŸ”

@luongthomas

This comment has been minimized.

Copy link

@luongthomas luongthomas commented Oct 4, 2019

The top command worked for me, thank you. I can go back to installing cmus now.

@SeanRenet

This comment has been minimized.

Copy link

@SeanRenet SeanRenet commented Oct 5, 2019

@mihkell's answer worked for me. Thank you

@obrien-k

This comment has been minimized.

Copy link

@obrien-k obrien-k commented Oct 14, 2019

Ran this to resolve on Windows Subsystem Linux (WSL): Debian:
sudo chown -R $(whoami) /home/linuxbrew

@derekedelaney

This comment has been minimized.

Copy link

@derekedelaney derekedelaney commented Oct 21, 2019

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Thanks @pointum!
For those wondering what that command does: checkout explainshell

@findli

This comment has been minimized.

Copy link

@findli findli commented Oct 22, 2019

dere

No need to chown the whole /usr/local if brew only fails to create a single directory.
For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Thanks @pointum!
For those wondering what that command does: checkout explainshell

thank you!

@robertopinotti

This comment has been minimized.

Copy link

@robertopinotti robertopinotti commented Oct 23, 2019

Hi, macOS 10.15 here.

I tried
sudo install -d -o $(whoami) -g admin /usr/local/Frameworks
and
sudo chown -R $(whoami) /usr/local/Homebrew
BUT same problem:
Error: Permission denied @ apply2files - /usr/local/share/ghostscript/9.27/Resource/CIDFSubst/ipaexg.ttf

I fixed with this:
sudo chown -R "$(whoami)":admin /usr/local/lib
and
brew link --overwrite node
source

@derekedelaney

This comment has been minimized.

Copy link

@derekedelaney derekedelaney commented Oct 23, 2019

@robertopinotti, looks like you need permission to use /usr/local/share. /usr/local/Frameworks won't work for you.

Have you tried sudo install -d -o $(whoami) -g admin /usr/local/share?

@sophiesanz

This comment has been minimized.

Copy link

@sophiesanz sophiesanz commented Oct 31, 2019

@aether2501 This worked for me:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
then
brew tap mongodb/brew

Thanks a lot!

@RushS

This comment has been minimized.

Copy link

@RushS RushS commented Nov 3, 2019

Thanks @pointum! It's worked for me

@mohamedshrif995

This comment has been minimized.

Copy link

@mohamedshrif995 mohamedshrif995 commented Nov 8, 2019

thanks it work for me

@nhaglind

This comment has been minimized.

Copy link

@nhaglind nhaglind commented Nov 12, 2019

That worked, thanks!

@nkuperwasser

This comment has been minimized.

Copy link

@nkuperwasser nkuperwasser commented Nov 26, 2019

I just found this on Stackoverflow, but from there, since the original call to install homebrew is a ruby command, Catalina OS uses the permissions from that call...https://emacs.stackexchange.com/questions/53026/how-to-restore-file-system-access-in-macos-catalina, and once I applied the workaround, home-brew installed with no problems....

@usmanasif

This comment has been minimized.

Copy link

@usmanasif usmanasif commented Jan 27, 2020

That worked for me.. Thanks.

@teclaelvis01

This comment has been minimized.

Copy link

@teclaelvis01 teclaelvis01 commented Feb 25, 2020

Working for me with:

sudo chown -R $(whoami) $(brew --prefix)/*

@gowrishcv

This comment has been minimized.

Copy link

@gowrishcv gowrishcv commented Feb 28, 2020

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Thanks it works

@viraths

This comment has been minimized.

Copy link

@viraths viraths commented Mar 14, 2020

I ran brew doctor and it gave me following suggestions and it perfectly worked.

sudo mkdir -p /usr/local/Frameworks /usr/local/sbin
sudo chown -R $(whoami) /usr/local/Frameworks /usr/local/sbin
@anhnt

This comment has been minimized.

Copy link

@anhnt anhnt commented Mar 23, 2020

No need to chown the whole /usr/local if brew only fails to create a single directory.

For example, I fixed this error:

Permission denied @ dir_s_mkdir - /usr/local/Frameworks

With this command:

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

it works thanks

@KimGenius

This comment has been minimized.

Copy link

@KimGenius KimGenius commented Mar 24, 2020

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Thank you!

@pointum

@hasanchoiri

This comment has been minimized.

Copy link

@hasanchoiri hasanchoiri commented Apr 17, 2020

this work for me... thank you very much...

@manoynmonic

This comment has been minimized.

Copy link

@manoynmonic manoynmonic commented Apr 26, 2020

sudo install -d -o $(whoami) -g admin /usr/local/Frameworks

Helps. Also had to include:

sudo install -d -o $(whoami) -g admin /private/tmp

@hobs0n

This comment has been minimized.

Copy link

@hobs0n hobs0n commented May 9, 2020

Hello peeps. I dont know if Im at the right part but this seems close :)

Brew has stopped working for me, Im getting the following error:

Traceback (most recent call last):
13: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in <main>' 12: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in require_relative'
11: from /usr/local/Homebrew/Library/Homebrew/global.rb:28:in <top (required)>' 10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' 8: from /usr/local/Homebrew/Library/Homebrew/config.rb:56:in <top (required)>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/pathname.rb:578:in mkpath' 6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:200:in mkdir_p'
5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:200:in each' 4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:215:in block in mkdir_p'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:215:in reverse_each' 2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:217:in block (2 levels) in mkdir_p'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:239:in fu_mkdir' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:239:in mkdir': Permission denied @ dir_s_mkdir - /private/tmp (Errno::EACCES)

Ive tried to do complete uninstalls of Brew and reinstalling but I cant get it to work :/

Any idea?

@kikieri

This comment has been minimized.

Copy link

@kikieri kikieri commented May 16, 2020

Same problem here output when I run "brew doctor"

Traceback (most recent call last):
13: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in <main>' 12: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in require_relative'
11: from /usr/local/Homebrew/Library/Homebrew/global.rb:36:in <top (required)>' 10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' 8: from /usr/local/Homebrew/Library/Homebrew/config.rb:56:in <top (required)>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/pathname.rb:578:in mkpath' 6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:200:in mkdir_p'
5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:200:in each' 4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:215:in block in mkdir_p'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:215:in reverse_each' 2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:217:in block (2 levels) in mkdir_p'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:239:in fu_mkdir' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:239:in mkdir': Permission denied @ dir_s_mkdir - /private/tmp (Errno::EACCES)

running osx 10.15.4 catalina. I tried all commands, reinstalling etc. but nothing worked out everytime the same output. Any Idea?

And when I tried the provided master/uninstall.sh

this happened:

mkdir: /tmp/uninstall.48213: Not a directory

Unable to create temp dir '/tmp/uninstall.48213'

@benjaminbisinger

This comment has been minimized.

Copy link

@benjaminbisinger benjaminbisinger commented May 20, 2020

Hello peeps. I dont know if Im at the right part but this seems close :)

Brew has stopped working for me, Im getting the following error:

Traceback (most recent call last):
13: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in <main>' 12: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in require_relative'
11: from /usr/local/Homebrew/Library/Homebrew/global.rb:28:in <top (required)>' 10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' 8: from /usr/local/Homebrew/Library/Homebrew/config.rb:56:in <top (required)>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/pathname.rb:578:in mkpath' 6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:200:in mkdir_p'
5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:200:in each' 4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:215:in block in mkdir_p'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:215:in reverse_each' 2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:217:in block (2 levels) in mkdir_p'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:239:in fu_mkdir' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:239:in mkdir': Permission denied @ dir_s_mkdir - /private/tmp (Errno::EACCES)

Ive tried to do complete uninstalls of Brew and reinstalling but I cant get it to work :/

Any idea?

Same issue here, even the uninstall script didn't work. Problem was that the /private/tmp directory was missing.
Solution:
sudo mkdir /private/tmp
sudo chmod 777 /private/tmp

@jinkinson

This comment has been minimized.

Copy link

@jinkinson jinkinson commented Jun 10, 2020

I just tried:
sudo chown -R $(whoami) /usr/local
After entering my password in response to a prompt, I received the following error message:
chown: /usr/local: Operation not permitted
As background, I'm trying to install Python 3.x using Homebrew on a Macbook Pro.
I previously entered the following from command line:
brew link python
Because python 3.7.7 was already installed and I just needed to link to it.
But I received the following error message in response to "brew link python":
Error: Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
rm '/usr/local/bin/2to3'

To force the link and overwrite all conflicting files:
brew link --overwrite python

To list all files that would be deleted:
brew link --overwrite --dry-run python
If I try to overwrite all conflicting files as indicated above (or if I remove the existing target and try to run "brew link python" again) I receive the following error message:
Linking /usr/local/Cellar/python/3.7.7... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

@harshitKyal

This comment has been minimized.

Copy link

@harshitKyal harshitKyal commented Jul 4, 2020

sudo chown -R $(whoami) /usr/local

Thank you ! It Worked.

@VolodymyrSeredaBBC

This comment has been minimized.

Copy link

@VolodymyrSeredaBBC VolodymyrSeredaBBC commented Jul 7, 2020

That did not work for me, it turns out my brew.sh had a weird flag preventing it from being deleted.

To check file flags, do:

ls -lO /usr/local/Homebrew/Library/Homebrew/brew.sh

Mine had the schg flag, so this fixed it for me:

sudo chflags noschg brew.sh
@stemvork

This comment has been minimized.

Copy link

@stemvork stemvork commented Jul 20, 2020

This is awesome. Was struggling with user permissions related to multiple accounts on one device.

@BATTLEROYALXS

This comment has been minimized.

Copy link

@BATTLEROYALXS BATTLEROYALXS commented Jul 30, 2020

sudo chown -R $(whoami) /usr/local

dont do this command

@stemvork

This comment has been minimized.

Copy link

@stemvork stemvork commented Jul 30, 2020

Can you elaborate on your experience @BATTLEROYALXS?

@janespottery

This comment has been minimized.

Copy link

@janespottery janespottery commented Aug 1, 2020

Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

@etc

This comment has been minimized.

Copy link

@etc etc commented Aug 5, 2020

Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Needless to say, do not do this. User reported.

@anuranjanagl

This comment has been minimized.

Copy link

@anuranjanagl anuranjanagl commented Sep 8, 2020

Thanks @mihkell

@raxetul

This comment has been minimized.

Copy link

@raxetul raxetul commented Sep 8, 2020

Adding your user to admin group and running command below is a better solution.
sudo chmod -R 775 /usr/local/*
sudo chown root:admin /usr/local/*

@hbinduni

This comment has been minimized.

Copy link

@hbinduni hbinduni commented Sep 20, 2020

after upgrading to High Sierra, uninstall brew & re-install with the below command to ensure the linking to the brew github and associated permissions to the local folder work correctly:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

this is the only one that work for me

@parth-koshta

This comment has been minimized.

Copy link

@parth-koshta parth-koshta commented Oct 15, 2020

sudo chown -R $(whoami) $(brew --prefix)/* is the how todo it in High Sierra

this worked for me thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.