38
36

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Homebrew で「error: The following untracked working tree files would be overwritten by merge: Library/Formula/libarchive.rb」というエラーが発生した場合の対応

Posted at

Homebrew の update 時にエラーが発生。

$ brew update

error: The following untracked working tree files would be overwritten by merge:
    Library/Formula/libarchive.rb
Please move or remove them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

この問題が発生した場合は、以下の手順をお試しください。

$ cd /usr/local/Library/Formula
$ git reset --hard FETCH_HEAD
HEAD is now at c784e68 clutter: better homepage

その後、update を実行。

$ brew update

Removing libarchive.rb
Updated Homebrew from c784e68f to c784e68f.
==> Updated Formulae
homebrew/dupes/ab        homebrew/dupes/fetchmail   homebrew/dupes/whois
homebrew/dupes/ant        homebrew/dupes/lapack
homebrew/dupes/diffstat        homebrew/dupes/openssh
==> Deleted Formulae
homebrew/dupes/libarchive

無事に update できました。

参考URL

38
36
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
38
36

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?