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.
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 .
“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.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With