尝试用brew update
更新Homebrew,我得到以下错误
error: The following untracked working tree files would be overwrittenby merge:
Library/Formula/argp-standalone.rb
Library/Formula/cocot.rb
Please move or remove them before you can merge.
Aborting
Updating e088818..5909e2c
Error: Failed while executing git pull origin refs/heads/master:refs/remotes/origin/master
我发现有人在安装Mountain Lion(我本周也安装了Mountain Lion)后遇到了类似的问题。他解释了如何删除错误消息中提到的文件
I removed these files:
$ cd $(brew --prefix)
$ rm cocot.rb
However, removing these files didn't help with the brew update. Instead I had to manually update brew through git:
$ cd $(brew --prefix)
$ git fetch origin
$ git reset --hard origin/master
$ brew update
Already up-to-date.
假设这些说明是正确的(我可能不应该假设),我试着按照这些说明去做
$ cd $(brew --prefix)
$ rm cocot.rb
然而,它说“文件不存在”,当我试图rm cota .rb
我不确定的一件事是cd $(brew --prefix)
这些是我键入的确切单词还是我必须用一些东西替换前缀?cd是成功的,所以我假设它是正确的——它将我移动到/usr/local,但没有文件要删除。/usr/local的内容为
Cellar clamXav git mysql var Library doc heroku mysql-5.5.15-osx10.6-x86_64 README.md etc include rvm bin foreman lib share
无论如何,你知道我如何修复“酿造更新”吗?
更新:根据favoretti的说明删除文件并尝试chown -R <your_username> $(brew --prefix)/.git
后,我在运行brew update
时得到以下错误
error: The following untracked working tree files would be overwritten by merge:
Library/Aliases/gperftools
Library/Aliases/hashdeep
Library/Aliases/htop
Library/Aliases/nodejs
Library/Aliases/ocio
Library/Aliases/oiio
Library/Aliases/pgrep
Library/Aliases/pkill
Library/Aliases/qt4
Library/Aliases/twolame
Library/Aliases/wxwidgets
Library/Contributions/cmds/brew-aspell-dictionaries
Library/Contributions/cmds/brew-beer.rb
Library/Contributions/cmds/brew-dirty.rb
Library/Contributions/cmds/brew-graph
Library/Contributions/cmds/brew-grep
Library/Contributions/cmds/brew-leaves.rb
Library/Contributions/cmds/brew-linkapps.rb
Library/Contributions/cmds/brew-ls-taps.rb
Library/Contributions/cmds/brew-man
Library/Contributions/cmds/brew-md5-to-sha1
Library/Contributions/cmds/brew-mirror-check.rb
Library/Contributions/cmds/brew-pull.rb
Library/Contributions/cmds/brew-readall.rb
Library/Contributions/cmds/brew-server
Library/Contributions/cmds/brew-services.rb
Library/Contributions/cmds/brew-switch.rb
Library/Contributions/cmds/brew-test-bot.rb
Library/Contributions/cmds/brew-tests.rb
Library/Contributions/cmds/brew-unpack.rb
Library/Contributions/cmds/brew-which.rb
Library/Contributions/cmds/git
Library/Contributions/cmds/svn
Library/ENV/4.3/apr-1-config
Library/ENV/4.3/bsdmake
Library/ENV/4.3/c++
Library/ENV/4.3/c89
Library/ENV/4.3/c99
Library/ENV/4.3/cc
Library/ENV/4.3/clang
Library/ENV/4.3/clang++
Library/ENV/4.3/cpp
Library/ENV/4.3/g++
Library/ENV/4.3/gcc
Library/ENV/4.3/git
Library/ENV/4.3/i686-apple-darwin11-llvm-g++-4.2
Library/ENV/4.3/i686-apple-darwin11-llvm-gcc-4.2
Library/ENV/4.3/ld
Library/ENV/4.3/llvm-g++
Library/ENV/4.3/llvm-g++-4.2
Library/ENV/4.3/llvm-gcc
Library/ENV/4.3/llvm-gcc-4.2
Library/ENV/4.3/make
Library/ENV/4.3/mig
Library/ENV/4.3/sed
Library/ENV/4.3/svn
Library/ENV/4.3/xcrun
Library/ENV/libsuperenv.rb
Library/ENV/pkgconfig/leopard/libcrypto.pc
Library/ENV/pkgconfig/leopard/libcurl.pc
Library/ENV/pkgconfig/mountain_lion/libcurl.pc
Library/ENV/pkgconfig/mountain_lion/libexslt.pc
Library/ENV/pkgconfig/mountain_lion/libxml-2.0.pc
Library/ENV/pkgconfig/mountain_lion/libxslt.pc
Library/Formula/abcl.rb
Library/Formula/abcmidi.rb
Library/Formula/aiccu.rb
Library/Formula/akka.rb
Library/Formula/alac.rb
Library/Formula/alure.rb
Library/Formula/appledoc.rb
Library/Formula/arangodb.rb
Library/Formula/argp-standalone.rb
Library/Formula/argtable.rb
Library/Formula/autopano-sift-c.rb
Library/Formula/avian.rb
Library/Formula/avidemux.rb
Library/Formula/avro-cpp.rb
Library/Formula/aws-cloudsearch.rb
Library/Formula/aws-sns-cli.rb
Library/Formula/backupninja.rb
Library/Formula/bact.rb
Library/Formula/bam.rb
Library/Formula/basex.rb
Library/Formula/berkeley-db4.rb
Library/Formula/bind.rb
Library/Formula/blazeblogger.rb
Library/Formula/bochs.rb
Library/Formula/boost149.rb
Library/Formula/bsdconv.rb
Library/Formula/bsdmake.rb
Library/Formula/buildapp.rb
Library/Formula/bup.rb
Library/Formula/byacc.rb
Library/Formula/cadubi.rb
Library/Formula/camellia.rb
Library/Formula/casperjs.rb
Library/Formula/ccextractor.rb
Library/Formula/cconv.rb
Library/Formula/cdo.rb
Library/Formula/cdpr.rb
Library/Formula/cgvg.rb
Library/Formula/checkstyle.rb
Library/Formula/chordii.rb
Library/Formula/chruby.rb
Library/Formula/cifer.rb
Library/Formula/clhep.rb
Library/Formula/cntlm.rb
Library/Formula/cocot.rb
Library/Formula/cogl.rb
Library/Formula/collada-dom.rb
Library/Formula/crash.rb
Library/Formula/crossroads.rb
Library/Formula/crosstool-ng.rb
Library/Formula/css-crush.rb
Library/Formula/csync.rb
Library/Formula/ctemplate.rb
Library/Formula/curlftpfs.rb
Library/Formula/cutter.rb
Library/Formula/cvsutils.rb
Library/Formula/darkstat.rb
Library/Formula/darner.rb
Library/Formula/dart.rb
Library/Formula/dasm.rb
Library/Formula/debianutils.rb
Library/Formula/dfc.rb
Library/Formula/dgtal.rb
Library/Formula/dhcping.rb
Library/Formula/di.rb
Library/Formula/dmtx-utils.rb
Library/Formula/drip.rb
Library/Formula/dsniff.rb
Library/Fo
Aborting
Updating e088818..c1fbc29
Error: Failed while executing git pull origin refs/heads/master:refs/remotes/origin/master