Reputation: 111
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.
Upvotes: 9
Views: 22122
Reputation: 41
This worked for me :
sudo xcode-select -r
Edit and set the date of your Mac as October 1st, 2019
sudo xcodebuild -runFirstLaunch
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
brew upgrade
Upvotes: 0
Reputation: 1
Install Homebrew. The missing package manager for macOS. This solved mine.
1.Open Terminal.
2.Paste the line below.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3.Hit return (It will do all of the processes by its own. I Hope this may help you).
Upvotes: -2
Reputation: 10940
You just have to upgrade to Homebrew 1.0.0 (1.1.0 or 1.2.0). Go to brew.sh
and follow the instructions.
Upvotes: -2
Reputation: 762
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.
Upvotes: 10
Reputation: 1102
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
Upvotes: 11