관리 메뉴

솜씨좋은장씨

[MacOS X] homebrew-core is a shallow clone. Error 해결 방법 본문

유용한 정보/APPLE

[MacOS X] homebrew-core is a shallow clone. Error 해결 방법

솜씨좋은장씨 2021. 5. 24. 20:11
728x90
반응형

오랜만에 brew를 활용하여 맥북에 pypy를 설치하고자 먼저

$ brew update

위의 명령어를 통하여 업데이트를 진행하려고 하였으나!

(base) SOMJANGui-MacBookPro:~ donghyunjang$ 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!

위처럼 에러가 발생하였습니다.

 

이 에러가 발생하는 원인은

2020년 10월 부터 HomeBrew가 더이상 Shallow clone을 생성하지 않기 때문이라고 합니다.

Shallow clone은 Git Repo의 이력이 많아지거나 용량이 클 수록

clone을 받는데에 시간도 많이 걸리고 스토리지도 많이 필요하게 되므로

Repo의 일부 이력만 받아오는 받아오는 것을 일컫습니다.

 

사설은 접어두고!

 

해결하는 방법은 다음과 같습니다.

생각보다 해결하는 방법은 쉽습니다.

왜냐하면!

에러메세지 아래에 어떤 명령어를 통하여 해결하라고 적혀있기 때문입니다.

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

위의 두 명령어를 실행한 이후에 다시 

$ brew update

업데이트를 진행하면!

 

제대로 업데이트 되는 것을 볼 수 있을겁니다.

 

읽어주셔서 감사합니다.

Comments