Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
638 views
in Technique[技术] by (71.8m points)

permissions - can't chown /usr/local for homebrew in Mac OS X 10.13 High Sierra

Homebrew needs permissions in /usr/local and since no one else uses my laptop I have always simply done

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

but in High Sierra, this gives

chown: /usr/local: Operation not permitted

What is the fix?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The problem kept occurring... after digging deeper I found that only uninstalling Homebrew and then re-installing it solved this issue.

Uninstalling will remove all your brew packages, you can save the output of brew list in a file first, to have a record of what packages were installed.

Uninstall Homebrew:

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

Then re-install it:

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...