Skip to content

Instantly share code, notes, and snippets.

@jonjack
Last active November 24, 2020 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonjack/007c37a7320d5a1ed9b5c87a8b3858f6 to your computer and use it in GitHub Desktop.
Save jonjack/007c37a7320d5a1ed9b5c87a8b3858f6 to your computer and use it in GitHub Desktop.
cannot complete brew install, not symlinked into /usr/local, requires me to chown /usr/local

While installing some formula I get:-

The formula built, but is not symlinked into /usr/local

Running brew as root is not allowed.

sudo brew install awscli

Password:
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.

Try and change the permissions of /usr/local does not work on my Mac.

sudo chown -R $(whoami) /usr/local
chown: changing ownership of '/usr/local/': Operation not permitted

So change ownership of everything under of /usr/local/:-

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

# or

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

This should now let brew create symlink in /usr/local/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment