MacOS Sierra 10.12: Homebrew cannot update brew Warning: we do not support this preview version

Yesterday I updated macOS Sierra when I brew upgradeade, an error appeared:

Warning: You are using OS X 10.12. We do not provide support for this pre-release version. You may encounter build failures or other breakages. Please create pull-requests instead of filing issues. 

I am looking for a long time to solve this problem,

eg:

 sudo xcode-select -s /Applications/Xcode.app/Contents/Developer 

or

  sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local 

And then restart the OS, there is still a problem.

/ usr / local already exists, it can be called.

So, I do not use the brew update, please help, I can not use it for a long time.

+8
homebrew macos-sierra macos
source share
3 answers

I have the same problem. This works for me:

Go to your terminal, enter the command, change whoami to your username.

 sudo chown -R $(whoami) /usr/local xcode-select --install 

You will give write permission to /usr/local , and you will also download and install the Command Line Development Tools from Apple, this may take 1 ~ 2 minutes.

Try updating if you see this error: Homebrew: Error: update-report should not be called directly

 brew upgrade 

Now do the update.

 brew update 

At the end you will see:

 Homebrew no longer needs to have ownership of /usr/local. If you wish you can return /usr/local to its default ownership with: sudo chown root:wheel /usr/local 

just do this:

 sudo chown root:wheel /usr/local 
+9
source share

After trying everything else, the next block of code finally did it for me ...

  cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update 

This code came from brew README https://github.com/Homebrew/brew/#update-bug .
After launch, this is what I got ...

  ==> Migrating HOMEBREW_REPOSITORY (please wait)... Error: /usr/local/Homebrew already exists. Please remove it manually or uninstall and reinstall Homebrew into a new location as the migration cannot be done automatically. 

I ignored the final error message and continued ...

  MacDePadre:local arick$ brew upgrade 

I had a lot of libraries that needed to be updated, so it took a long time, but this seems to fix the problem.

+8
source share

You just need to upgrade to Homebrew 1.0.0 (1.1.0 or 1.2.0). Go to brew.sh and follow the instructions.

-one
source share

All Articles