Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'brew update' errors on MacOS 10.13 (High Sierra) #3285

Closed
4 tasks done
JustinTRoss opened this issue Oct 8, 2017 · 6 comments
Closed
4 tasks done

'brew update' errors on MacOS 10.13 (High Sierra) #3285

JustinTRoss opened this issue Oct 8, 2017 · 6 comments

Comments

@JustinTRoss
Copy link

JustinTRoss commented Oct 8, 2017

Please always follow these steps:

  • Confirmed this is a problem with running a brew command and not brew installing or the post-install behaviour of one or more formulae? If it's a formulae-specific problem please file this issue at the relevant tap e.g. for Homebrew/homebrew-core https://github.com/Homebrew/homebrew-core/issues/new
  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed all issues and retried your prior step?
  • Ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

  • What you were trying to do (and why)
    I have updated to MacOS 10.13 (High Sierra). I am trying to run 'brew update' for the first time since the update.
  • What happened (include command output)
    Output:
Error: /usr/local is not writable. You should change the ownership
and permissions of /usr/local back to your user account:
  sudo chown -R $(whoami) /usr/local
  • What you expected to happen
    Homebrew should update.
  • Step-by-step reproduction instructions (by running brew commands)

brew update after updating to 10.13

I ran brew doctor and received the following list of instructions:

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: /usr/local is not writable.

You should change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami) /usr/local

Warning: /usr/local is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. For example, upgrading
to OS X El Capitan has been known to do this. Some versions of the
"InstantOn" component of Airfoil or running Cocktail cleanup/optimizations
are known to do this as well.

You should change the ownership and permissions of /usr/local back to
your user account.
  sudo chown -R $(whoami) /usr/local

Warning: /usr/local/share/python is not needed in PATH.

Formerly homebrew put Python scripts you installed via `pip` or `pip3`
(or `easy_install`) into that directory above but now it can be removed
from your PATH variable.
Python scripts will now install into /usr/local/bin.
You can delete anything, except 'Extras', from the /usr/local/share/python
(and /usr/local/share/python3) dir and install affected Python packages
anew with `pip install --upgrade`.

Warning: You are using OS X 10.13.
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.

Warning: Ruby version 2.3.3 is unsupported on 10.13. Homebrew
is developed and tested on Ruby 2.0, and may not work correctly
on other Rubies. Patches are accepted as long as they don't cause breakage
on supported Rubies.

Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours. This is a long time in brewland!
To update Homebrew, run `brew update`.

As you're likely aware, '/usr/local' is not writeable in 10.13. I tried the same with '/usr/local/include' as suggested by another issue. This did not work.

My version is a bit outdated:

HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9f6cb8ed040d37d9706ee2b26e2c0a414f9a4660
Last commit: 1 year, 2 months ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: e490f85beb0835680e3580a11a33aaa38e0ce9c9
Core tap last commit: 1 year, 2 months ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit ivybridge
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.0 build 900
Git: 2.13.5 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Java: 1.8.0_101
OS X: 10.13-x86_64
Xcode: 9.0
CLT: N/A
X11: N/A

I suspect uninstalling and reinstalling will solve my problems.

@JustinTRoss
Copy link
Author

Re-install with instructions from Homebrew homepage result in failure.

@JustinTRoss
Copy link
Author

JustinTRoss commented Oct 8, 2017

The following worked to re-install:

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

Brew now works entirely as expected..

@ilovezfs
Copy link
Contributor

ilovezfs commented Oct 8, 2017

@JustinTRoss glad to hear you got this sorted out!

@ilovezfs ilovezfs closed this as completed Oct 8, 2017
@JustinTRoss
Copy link
Author

@ilovezfs Is that uninstall and reinstall cycle the recommended approach for users moving to High Sierra?

@MikeMcQuaid
Copy link
Member

@JustinTRoss if you see an identical failure yes but it shouldn't be required for the vast majority of users.

@monajalal
Copy link

I was getting the below error

Sat Nov 04 17:11:30 :~/CS585/project$ brew tap homebrew/science
Error: /usr/local is not writable. You should change the
ownership and permissions of /usr/local back to your
user account:
  sudo chown -R $(whoami) /usr/local

and @JustinTRoss solution fixed it! Thanks!

@Homebrew Homebrew locked and limited conversation to collaborators Nov 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants