Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't chown /usr/local in High Sierra #3228

dtamayo opened this Issue Sep 27, 2017 · 4 comments


None yet
4 participants
Copy link

dtamayo commented Sep 27, 2017

I am running OS X High Sierra and need to change permissions for /usr/local, but it won't let me. I first ran brew update, and after fixing issues, brew doctor just gives:

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:

brew link ruby gives:

Linking /usr/local/Cellar/ruby/2.4.2...
Error: Could not symlink include/ruby-2.4.0
/usr/local/include is not writable.

sudo chown -R $(whoami) $(brew --prefix) gives
chown: /usr/local: Operation not permitted

ls -lO /usr gives
total 0
drwxr-xr-x 975 root wheel restricted 31200 26 Sep 21:55 bin
drwxr-xr-x 292 root wheel restricted 9344 26 Sep 22:06 lib
drwxr-xr-x 233 root wheel restricted 7456 26 Sep 21:55 libexec
drwxr-xr-x 13 root wheel sunlnk 416 26 Sep 22:05 local
drwxr-xr-x 246 root wheel restricted 7872 26 Sep 21:55 sbin
drwxr-xr-x 46 root wheel restricted 1472 26 Sep 21:55 share
drwxr-xr-x 5 root wheel restricted 160 21 Sep 00:32 standalone

brew config gives

HEAD: ac8b585
Last commit: 2 days ago
Core tap ORIGIN:
Core tap HEAD: 168b65e
Core tap last commit: 2 hours ago
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit kabylake
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.0 build 900
Git: 2.14.1 => /usr/local/bin/git
Perl: /usr/local/bin/perl => /usr/local/Cellar/perl/5.26.0/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/Resources/
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Java: N/A
macOS: 10.13-x86_64
Xcode: 9.0
X11: N/A

Any ideas on how to proceed? Thanks!


This comment has been minimized.

Copy link

ilovezfs commented Sep 27, 2017

Correct. /usr/local can no longer be chown'd in High Sierra. Instead use

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

This comment has been minimized.

Copy link

dtamayo commented Sep 28, 2017

Amazing, thanks! I first had to mkdir include and Frameworks in /usr/local before running that command, but now everything works.

@dtamayo dtamayo closed this Sep 28, 2017


This comment has been minimized.

Copy link

MikeMcQuaid commented Sep 28, 2017

From the issue template:

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you do not read fill out the issue template repeatedly you will be blocked from every submitting issues to Homebrew again.


This comment has been minimized.

Copy link

ethicalhack3r commented Oct 3, 2017

FYI I had to create the /usr/local/include directory before running sudo chown -R $(whoami) $(brew --prefix)/* to fix.

Thank you for the help!

machupicchubeta added a commit to machupicchubeta/dotfiles that referenced this issue Oct 4, 2017

`/usr/local` can no longer be chown'd in High Sierra
As a workaround, execute the command to the subdirectory.

The error message was:
chown: changing ownership of '/usr/local': Operation not permitted

See also:
- Homebrew/brew#3228

@Homebrew Homebrew deleted a comment from EugeneDae Oct 11, 2017

@Homebrew Homebrew locked and limited conversation to collaborators Oct 11, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.