Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Update errors (homebrew/dupes and configure error on ML) #14164

Closed
fortin opened this issue Aug 13, 2012 · 10 comments
Closed

Update errors (homebrew/dupes and configure error on ML) #14164

fortin opened this issue Aug 13, 2012 · 10 comments

Comments

@fortin
Copy link

fortin commented Aug 13, 2012

Hi, I've been getting several brew update errors that none of the suggested fixes resolve. For example:

MBA:~ fortin$ brew update
error: Your local changes to the following files would be overwritten by merge:
    expect.rb
    libiconv.rb
    ncurses.rb
    openldap.rb
    openssh.rb
    perl.rb
    tcl.rb
    tk.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failed to update tap: homebrew/dupes
Updated Homebrew from 008b09ca to 7dd2e5f4.
==> Updated Formula
apollo      drush       libxmlsec1  vorbis-tools    z
bigloo      icarus-verilog  scm-manager x264
MBA:~ fortin$ ls
Cellar          hidden          sbin
Library         hw_mobile_userdata  share
README.md       include         texlive
bin         lib         var
etc         man

The most popular fix for this kind of thing seems to be the following, but it doesn't fix anything for me:

MBA:~ fortin$ cd /usr/local && sudo git reset --hard FETCH_HEAD
HEAD is now at 008b09c dnsmasq: use options DSL

Plus, when I brew update after running this last command, trying it again gives a different error:

MBA:~ fortin$ cd /usr/local && sudo git reset --hard FETCH_HEAD
HEAD is now at 7dd2e5f libxmlsec1: fix configure error on ML

I can't find any instructions on how to fix configure error on ML. Any help with this would be much appreciated.

@mistydemeo
Copy link
Member

Please don't use sudo when doing this. It's not a good idea!

Instead of cd /usr/local, try cd /usr/local/Library/Taps/homebrew-dupes && git reset --hard, then brew update.

@fortin
Copy link
Author

fortin commented Aug 13, 2012

Thanks for the quick reply! I didn't think any commands in /usr/local required sudo, and I never used it. But, anyway, your suggestion worked! brew is updating as it should.

What do you think could have caused these problems in the first place?

Thanks so much!

@2bits
Copy link
Contributor

2bits commented Aug 14, 2012

This is often caused by a lack of vegetables, but don't quote me. This could be the one that depends_on 'fruit'

@mistydemeo
Copy link
Member

@2bits++

What happened was that there were changes to files in your copy of the homebrew-dupes tap; since there were new changes to those files being pulled in, brew update wasn't able to merge them in. This might have happened if you made manual changes to the files, or if something went wrong while doing brew update another time - for instance, permissions errors.

@fortin
Copy link
Author

fortin commented Aug 14, 2012

@mistydemeo

Thanks. I hadn't made any manual changes to anything in /usr/local, so I'm happy with 'something went wrong' :)

@fortin fortin closed this as completed Aug 14, 2012
@mxcl
Copy link
Contributor

mxcl commented Aug 14, 2012

We really need to figure out how this sort of thing happens and do repairs or suggest steps for the user to take.

@AdrienGiboire
Copy link

@mxcl ++

I went through these issue having changes I am sure I never made.

@jwswj
Copy link

jwswj commented Feb 14, 2014

Thanks for the tip @mistydemeo

@jweyrich
Copy link

jweyrich commented Oct 5, 2014

Check whether you have directories/files in /usr/local/Library/Taps/homebrew/homebrew-dupes/.git/objects that belong to root:admin rather than your_user:admin. I had the same problem and found multiple directories/files belonging to root -- I probably must have used sudo during an brew update in the past -- The strange thing is that I got the same error, Error: Failed to update tap: homebrew/dupe, not a permission error. Doing a sudo chown -R user:admin /usr/local/Library/Taps/homebrew/homebrew-dupes/.git/objects did fix it for me.

@zadacka
Copy link

zadacka commented Oct 21, 2014

I've run across this problem and it also turned out to be a permissions issue exactly as @jweyrich experienced. chown fixed it. Don't remember having sudo'd any brew commands in the past though, so now idea how the permissions got changed.

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

No branches or pull requests

8 participants