homebrewのupdateでエラーが出た話 [mac]
homebrewでupdateする際にエラーが出た軽くハマったのでその時のメモ。
その時に出たエラーが以下の内容。
とりあえず指示されたコマンドを叩いてみる
変わらず。
エラー文をよく見ると"Library/Formula/mysql.rb"のmergeに失敗してるっぽい。
なのでそこをチェックしてみる。
中身変わってないのにindexが更新されてる。なのでそこをresetしてみる。
解消されたので一度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
今度はうまくいった。
コメント 0