SSブログ

homebrewのupdateでエラーが出た話 [mac]

homebrewでupdateする際にエラーが出た軽くハマったのでその時のメモ。

その時に出たエラーが以下の内容。
% brew update
error: Your local changes to the following files would be overwritten by merge:
 Library/Formula/mysql.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master


とりあえず指示されたコマンドを叩いてみる
% cd /usr/local
% git pull -q origin refs/heads/master:refs/remotes/origin/master
error: Your local changes to the following files would be overwritten by merge:
 Library/Formula/mysql.rb
Please, commit your changes or stash them before you can merge.
Aborting


変わらず。

エラー文をよく見ると"Library/Formula/mysql.rb"のmergeに失敗してるっぽい。
なのでそこをチェックしてみる。
% cd /usr/local/Library/Formula
% git status -s
M mysql.rb
% git diff
%


中身変わってないのにindexが更新されてる。なのでそこをresetしてみる。
% git reset --hard 
HEAD is now at 054f155 mutt: make thread/sidebar patches mutually exclusive
% git status
# On branch master
nothing to commit (working directory clean)


解消されたので一度updateを実行してみる。
% brew update
Updated Homebrew from a7d1aae1 to b755828c.
==> New Formulae
homebrew/versions/gst-plugins-bad010	homebrew/versions/gst-python010
homebrew/versions/gst-plugins-base010	homebrew/versions/gst-rtsp010
homebrew/versions/gst-plugins-good010	homebrew/versions/gstreamer010
homebrew/versions/gst-plugins-ugly010
==> Updated Formulae
gst-libav	    gst-plugins-good	libffi
gst-plugins-bad	    gst-plugins-ugly	rbenv
gst-plugins-base    gstreamer		spin
==> Deleted Formulae
gst-python   gst-rtsp


今度はうまくいった。
nice!(0)  コメント(0) 
共通テーマ:パソコン・インターネット

nice! 0

コメント 0

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。