카테고리 없음

macOS에서 git 사용시 xcrun error 발생시 대처 방법

드라이빙 인사이트 2019. 12. 6. 06:33
반응형

몇 번째인지 모르겠지만 맥북과 iMac을 사용하다 운영체제를 업그레이드 한 이후 git을 사용할 때 다음과 같은 에러가 발생했다.

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

최근에는 카탈리나(Catalina) 버전으로 업그레이드 한 이후 위 에러가 발생했다.

$ git --version
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

 

운영체제를 업그레이드하면서 Xcode Command Line Tools 관련하여 뭔가 문제가 발생하는 것 같았다. Xcode를 사용하고 있지 않아서 의아했지만 매번 간단한 방법으로 해결하고 있다.

 

해결 방법

해결방법은 간단하다. 

xcode-select --install

다시 설치하면 된다.

$ git --version
git version 2.21.0 (Apple Git-122.2)

 

반응형