chown: /usr/local: Operation not permitted [Solved]

 

After installing homebrew on MAC, the blog will be installed in advance. According to the steps, the same error will be reported during brew update: error:/usr/local must be writable! This article also gives a solution (sudo chown – R $(whoamI)/usr/local), but this method can’t solve the problem for higher version OS, and it will report chown:/usr/local: operation not permitted error

Later in https://stackoverflow.com/questions/46459152/cant-chown-usr-local-for-homebrew-in-osx-10-13-high-sierra The solution is given on the web page, which is summarized as follows:

First, uninstall the installed Hometree. The command is as follows:

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

Then re install:

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

Through this method, we can get the latest homebrew directly, and the expected effect appears

I’ve tried, OK on MAC 10.13.5 system

Similar Posts: