Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

macOS Sierra 10.12 : Homebrew can't brew upgrade Warning: We do not provide support for this pre-release version

Yesterday I upgrade macOS Sierra, When I brew upgade,appeared error:

     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 search long time for solve for 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 reboot OS,there are still this problem.

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

So,I don't use brew upgrade, please help,I have a long time can't use it.

like image 302
Marcos Avatar asked Oct 04 '16 01:10

Marcos


People also ask

Does Homebrew work on M1 Macs?

Migrating From Intel Mac. If you're coming to M1 Mac fresh, without any old projects or profiles, you probably won't notice; Homebrew will work as it always has. But if you're trying to migrate from an Intel Mac you won't be able to just move packages that were once in /usr/local over to /opt/homebrew .

Is Homebrew necessary for Mac?

“Homebrew installs the stuff you need that Apple didn't” — this is how Homebrew creators describe it, and we agree. If you want a more informative definition, Homebrew is a free and open-source package manager for macOS, helping you install, update, uninstall, and manage developer tools like Python, Ruby, and Node.

Does Homebrew automatically update packages?

An easy, convenient way to automatically update Homebrew. This script will run brew update in the background once every 24 hours (by default) until explicitly told to stop, utilising launchd . brew upgrade and brew cleanup can also be handled automatically but are optional flags.


2 Answers

I have same problem. This works for me:

Go to your terminal, type those command, change whoami to your username.

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

You will give write permission to /usr/local and also you will download and install Command Line Developer Tools from Apple, it may take like 1~2 mins.

Try to run upgrade in case of you are seeing such error:Homebrew: Error: update-report should not be called directly

brew upgrade

Now do the update.

brew update

In 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 it:

sudo chown root:wheel /usr/local
like image 96
xiaoyaoworm Avatar answered Oct 13 '22 22:10

xiaoyaoworm


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

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

This code came from the brew README https://github.com/Homebrew/brew/#update-bug.
After running it, 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 went on with ...

  MacDePadre:local arick$ brew upgrade

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

like image 10
A. Rick Avatar answered Oct 13 '22 21:10

A. Rick