LoginSignup
10
8

More than 5 years have passed since last update.

Homebrewが壊れたときの対応

Last updated at Posted at 2013-04-03

電車の中でbrew updateをかけたところ、通信品質が悪かったせいかbrewの実行に必要なRubyのライブラリファイルが消えてしまったようで、brewが実行できなくなってしまいました。

そのようなときは、以下で復旧します。

cd /usr/local && git checkout .
brew doctor

Homebrewのツリーは単なるGitレポジトリですので、/usr/local上でgit checkout .すれば基本的には復旧します(brew doctorは念のために実施している、程度の意味)。

私が試した限りでは、この対応で既存のCellerが壊れることはありませんでした。


なお…「通信状況の悪いところではbrew updateしない」ことも心がけた方がよいでしょう。

10
8
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
10
8