본문 바로가기
Develop Basic

홈브류 에러 해결! Error: homebrew-core is a shallow clone.

by 워니 wony 2021. 5. 27.
brew update

 

brew 최신 버전으로 업데이트 하는 것으로, 오랜만에 다른 패키지를 설치 하기 전에 homebrew 업데이트 하게 된다.

 

해당 명령어를 사용했는데 아래와 같이 에러가 발생해서 순간 당황을 했다. 하지만 역시 에러메시지에 답이 있다. homebrew 설치 shallow clone 하지 않기 때문에 생긴 문제로 설명에 친절하게 나와 있는데로 진행하면 정상적으로 홈브루 업데이트를 있다.

 

~ master* 6s
❯ 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
These commands may take a few minutes to run due to the large size of the repositories.
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
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

 

~ master*
❯  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
remote: Enumerating objects: 650614, done.
remote: Counting objects: 100% (650560/650560), done.
remote: Compressing objects: 100% (224019/224019), done.
remote: Total 641168 (delta 421679), reused 633654 (delta 414290), pack-reused 0
Receiving objects: 100% (641168/641168), 254.18 MiB | 8.94 MiB/s, done.
Resolving deltas: 100% (421679/421679), completed with 6443 local objects.
From https://github.com/Homebrew/homebrew-core
   dc577dc143..451beb7e87  master     -> origin/master
~ master*
❯ git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
remote: Enumerating objects: 90749, done.
remote: Counting objects: 100% (87889/87889), done.
remote: Compressing objects: 100% (28541/28541), done.
remote: Total 80612 (delta 59124), reused 73429 (delta 52052), pack-reused 0
Receiving objects: 100% (80612/80612), 39.50 MiB | 7.23 MiB/s, done.
Resolving deltas: 100% (59124/59124), completed with 4453 local objects.
From https://github.com/Homebrew/homebrew-cask
   5323a77fed..ee42c10eac  master     -> origin/master

 

 

 

이제 제대로 update 명렁어가 실행 된다.

역시 에러메시지를 제대로 보면 해결된다는 것은 진리인듯 하다.

반응형

댓글