터미널에서 git과 관련된 모든 명령어가 수행되지 않는다.
git --version도 당연히 안 되며 git 명령을 수행하기 위해
명령어 라인 도구를 설치하라고 한다.
설치를 두 번이고 세 번이고 진행하고,
심지어는 Xcode를 두 번이나 재설치해도 해결이 안 됐었다.
당시에 터미널에 떴었던 오류 코드는 다음과 같다.
2022-07-25 20:01:57.751 xcodebuild[2079:17017] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-07-25 20:01:57.751 xcodebuild[2079:17017] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdx" cannot be located.
git: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdx' (errno=No such file or directory)
git: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdx -find git 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)
xcode-select: Failed to locate 'git', requesting installation of command line developer tools.

오류가 뜬 뒤 위와 같이 알림 창이 뜬다.
하지만 설명에 따라 도구를 설치해도
git --version 등의 명령어는 전혀 실행되지 않는다...
단도직입적으로 내가 해결한 방법은 다음과 같다.
Xcode 13.3 spits "Requested but di… | Apple Developer Forums
MrtnFbg's answer inspired me to read more about redirections of streams. So I read about Linux STDOUT STDERR. In this specific case when I run this command, there is an output and there are some errors. Since I ran this command on terminal and on terminal
developer.apple.com
위 링크의 글을 참고해, 다음과 같이 터미널에 입력했다.
sudo xcode-select -s /Library/Developer/CommandLineTools
그랬더니 git --version이 정상적으로 작동했다...
만약 안 된다면 해당 링크에 다른 해결 방법들이
다수 있는 것 같으니 시도해보면 좋을 것 같다.
찾아 보니 xcode-select는 xcode를 설정하는 명령어 같고,
-s는 활성화된 개발자 디렉토리의 경로 설정을 위한 옵션인 듯.
정확히는 모르겠지만 일단 해결했으니..
고통받을 사람들이 있을까 싶어서 올려 본다.
'tip' 카테고리의 다른 글
맥북 Xcode에서 파일 확장자명 보이게 설정하는 방법 (0) | 2022.08.02 |
---|---|
Safari에서 Tistory 무한 로딩 문제 해결 (0) | 2022.07.26 |
Wix로 아카이빙 웹사이트 만들기 (0) | 2022.06.25 |
Safari - Whale 북마크 연동하기(iCloud) (0) | 2022.06.23 |
바밀로 멀티미디어 키 변경 방법 (3) | 2022.02.05 |