IT/이슈 대응

[MAC] Homebrew Error: homebrew-core is a shallow clone.

언클린 2021. 11. 22. 20:07
728x90

어느 날 Homebrew를 업데이트 하려고 하니 아래와 같은 오류가 발생했다. 따로 install 하는 것에는 문제는 없었지만 업데이트가 진행되지 않아 해결법을 찾아보았다.


1.  오류 전문

Error: 
  homebrew-core is a shallow clone.
To `brew update`, first run:
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This command may take a few minutes to run due to the large size of the repository.
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!

오류 원인은 homebrew 설치 시 shallow clone 을 생성하지 않기 때문이라고 한다

나는 homebrew-core 문제였지만, 상황에 따라선 homebrew-cask 도 발생한다고 한다

2.  해결법

해결법은 의외로 간단했다. 에러문에서 알려주고 있었기 때문에...

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

해당문을 실행하고 나면, 아래와 같이 바쁘게 움직인 뒤 실행 완료 된다.

remote: Enumerating objects: 578517, done.
remote: Counting objects: 100% (578507/578507), done.
remote: Compressing objects: 100% (203426/203426), done.
remote: Total 569692 (delta 368428), reused 564677 (delta 363418), pack-reused 0
Receiving objects: 100% (569692/569692), 210.54 MiB | 10.08 MiB/s, done.
Resolving deltas: 100% (368428/368428), completed with 3825 local objects.

 

해결!!


 

 

 

 

728x90