狼読

 
2020/12/24

brew update でエラーになった話(2020/12/24)

こんにちは!タマリュウです。

久しぶりにhomebrewをアップデートしようとしたらエラーが出たので記事にしておこうと思います。

$ brew update

実行した結果

Error: 
  homebrew-core is a shallow clone.
  homebrew-cask is a shallow clone.
To `brew update`, first run:
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
This restriction has been made on GitHub's request because updating shallow clones is an extremely expensive operation due to the tree layout and traffic of Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you automatically to avoid repeatedly performing an expensive unshallow operation in CI systems (which should instead be fixed to not use shallow clones). Sorry for the inconvenience!

エラーが出ました。
エラーの内容は、「処理の負荷を考慮して手動でやってね」ということみたいですね。
ここは言われたとおりに実行していきましょう。

$ git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow

上記を実行。

remote: Enumerating objects: 661804, done.
remote: Counting objects: 100% (661749/661749), done.
remote: Compressing objects: 100% (225707/225707), done.
remote: Total 652613 (delta 429583), reused 647076 (delta 424051), pack-reused 0
Receiving objects: 100% (652613/652613), 261.06 MiB | 8.80 MiB/s, done.
Resolving deltas: 100% (429583/429583), completed with 4076 local objects.

処理が完了したらもう一つの方も同じように実行しましょう。

$ git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

実行して次のように処理が終わるのを待ちましょう。

remote: Enumerating objects: 55840, done.
remote: Counting objects: 100% (54220/54220), done.
remote: Compressing objects: 100% (17624/17624), done.
remote: Total 49401 (delta 36227), reused 44909 (delta 31768), pack-reused 0
Receiving objects: 100% (49401/49401), 24.99 MiB | 6.96 MiB/s, done.
Resolving deltas: 100% (36227/36227), completed with 2140 local objects.
From https://github.com/Homebrew/homebrew-cask
   a56561aca2..064d8884f1  master     -> origin/master

これでエラー文に言われたことはクリアです。
再度、homebrew のアップデートをしてみます。

$ brew update

無事にアップデートができます。これで無事に解決です!

Profile Card

タマリュウ

生息地:福井県
WEB制作会社を立ち上げて日々レベルアップの修行中! 俺自身まだまだ修行中なので、新しく学んだこと、引っかかったポイントを備忘録として記事にして皆さんと共有できればと思っています。 読んで誰が得するのかわからない情報も発信します!

関連記事

Related Post

2020/04/22

【Photoshop】超簡単!ブラシツールで煙のエフェクトをつくってみよう!

投稿カレンダー

2024年4月
1234567
891011121314
15161718192021
22232425262728
2930  

graphics

category

©狼読