Skip to content
This repository has been archived by the owner. It is now read-only.

brew update error #49879

Closed
lxn348567248 opened this issue Mar 8, 2016 · 11 comments

Comments

@lxn348567248
Copy link

commented Mar 8, 2016

Bug reports:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Library/brew.rb:15:in `<main>'
@MikeMcQuaid

This comment has been minimized.

Copy link
Member

commented Mar 8, 2016

Please try to rerun brew update twice and see if that resolves the issue.

@DomT4 DomT4 added the needs response label Mar 9, 2016

@lxn348567248

This comment has been minimized.

Copy link
Author

commented Mar 9, 2016

when i executed brew update,got the same error.
thanks

@dunn dunn removed the needs response label Mar 10, 2016

@dunn

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2016

If you haven't made any modifications to your Homebrew installation, you can reset it with:

cd $(brew --prefix) && git fetch origin && git reset --hard origin/master
@sambeau

This comment has been minimized.

Copy link

commented Mar 11, 2016

I'm getting this error too. I have no idea why. Does anyone know what might have triggered it? I've tried brew update (same error) and I've tried resetting which gives different errors:

warning: unable to unlink CONTRIBUTING.md: Permission denied
warning: unable to unlink SUPPORTERS.md: Permission denied
fatal: cannot create directory at '.github': Permission denied
@DomT4

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2016

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

And then try again.

@sambeau

This comment has been minimized.

Copy link

commented Mar 14, 2016

Thanks, everyone. For future reference, the fix for me was:

sudo chown -R $(whoami):admin /usr/local
cd $(brew --prefix) && git fetch origin && git reset --hard origin/master

then I could

brew update

and carry on as normal.

Does anyone have an idea what caused the change in permissions? Is it likely something stupid that I did?

@lxn348567248

This comment has been minimized.

Copy link
Author

commented Mar 14, 2016

thanks everyone .
I have found the problem.because of china I can't pull update from git.
when I use poxy,I fix it.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

commented Mar 14, 2016

Thanks for letting us know @lxn348567248.

@DomT4

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2016

Does anyone have an idea what caused the change in permissions? Is it likely something stupid that I did?

Could be anything, really. Installed something from a .pkg file is a common one, some anti-virus software has been known to be a little root-happy, running commands that modify/create permissions/folders/files with sudo, etc. I wouldn't worry about it too much unless it proves repetitive.

@cehwitham

This comment has been minimized.

Copy link

commented Mar 16, 2016

This also worked for me. Many thanks.

@snadal

This comment has been minimized.

Copy link

commented Apr 3, 2016

+1. @sambeau fix worked for me too. Thank you !

@Homebrew Homebrew locked and limited conversation to collaborators Apr 3, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
7 participants
You can’t perform that action at this time.