Running xcode-select -p returns /Applications/Xcode.app/Contents/Developer, which is what Xcode 14 configured automatically. I'm not positive that those two things are related, but you can see above that the macOS SDK that xcodebuild is looking for is MacOSX12.3.sdk. In my case, Xcode updated to v14.1 and my Mac is running macOS 12.6. Xcode-select: Failed to locate 'git', requesting installation of command line developer tools. Git: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/atform/Developer/SDKs/MacOSX12.3.sdk -find git 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory) Git: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/atform/Developer/SDKs/MacOSX12.3.sdk' (errno=No such file or directory) Xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/atform/Developer/SDKs/MacOSX12.3.sdk" cannot be located. The error I was seeing relating to the git binary was: 16:33:18.828 xcodebuild Writing error result bundle to /var/folders/mc/tm26v4sd0pv1hncprqdff72h0000gn/T/ResultBundle_16-33-0018.xcresult Which copies the older "MacOSX12" SDK into the Xcode 14 folders and seems to make everyone happy. Tl dr the solution is to run sudo cp -R /Library/Developer/CommandLineTools/SDKs/MacOSX12* /Applications/Xcode.app/Contents/Developer/Platforms/atform/Developer/SDKs/ I had this same problem, but none of the solutions above worked for me. Keep in mind that the Xcode tools when opening Xcode after further updates will need to be updated, but in my experience this should NOT affect the CLI tools. It seems the issue is not related to the architecture of the mac (M1 or Intel) or the Xcode version! Keep in mind, tools for the platforms you chose will be downloaded in the background, which might take a bit. Close and re-open your Terminal and try your CLI tools again.Choose as few as possible as these take hard disk space!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |