After upgrade to Big Sur git stopped working

After upgrade to Big Sur git stopped working and it keeps prompting to install CLT. According to Xcode-select, see output below CLT is already installed:

sbezverk@sbezverk-mac-2 ~ % sudo xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

sbezverk@sbezverk-mac-2 ~ % git

sh: line 1:   772 Bus error: 10           /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -find git 2> /dev/null

git: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -find git 2> /dev/null' failed with exit code 35328: (null) (errno=No such file or directory)

xcode-select: Failed to locate 'git', requesting installation of command line developer tools.

Any help to solve this issue would be great.
Post not yet marked as solved Up vote post of sbezverk Down vote post of sbezverk
34k views

Replies

Same issue. Literally every time I run a Big Sur update, the xcode command line tools are gone after the update.

What even is going on?
Has anyone filed a bug about this (per my request a few weeks back)? If so, what was the bug number?

I ran this past DTS’s tools specialist and it’s not something we’re tracking. A bug number might let me find more info.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Has anyone filed a bug about this …?

It turns out that, while no one posted a bug number here, lots of folks have file a bug about this (r. 73410925). This is clearly a real problem but, alas, I have no info to share as to when it’ll be resolved.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Same here, after every update on Big Sur I need to run xcode-select --install to reinstall the command line tools. Feels like this really shouldn't be an issue. It's quite annoying.
@eskimo,

Yes, I updated to Big Sur and I got the same issue. I have raised FB9077129 for your kind reference.

Even after installing the command line tools for xcode-beta13 I get the following error when trying to install wireshark development code in my system after updating to BigSur.

bash-3.2$ wireshark/tools/macos-setup.sh macos-setup.sh: Couldn't find an SDK for macOS 11.4 or later bash-3.2$ sudo xcode-select -switch /Library/Developer/CommandLineTools bash-3.2$ cd wireshark bash-3.2$ tools/macos-setup.sh macos-setup.sh: Couldn't find an SDK for macOS 11.4 or later bash-3.2$

Also when I do cmake to setup the wireshark development environment I get the following error

bash-3.2$ cmake ../wireshark -- Generating build using CMake 3.19.2 -- LTO/IPO is not enabled -- CMake build type: RelWithDebInfo -- V: 3.5.0, MaV: 3, MiV: 5, PL: 0, EV: . -- Linker flags: -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'glib-2.0' CMake Error at /Users/mmunuswamy/Qt/Tools/CMake/CMake.app/Contents/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message): Could NOT find GLIB2 (missing: GLIB2_LIBRARY GLIB2_MAIN_INCLUDE_DIR GLIB2_INTERNAL_INCLUDE_DIR) (Required is at least version "2.38.0") Call Stack (most recent call first): /Users/mmunuswamy/Qt/Tools/CMake/CMake.app/Contents/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE) cmake/modules/FindGLIB2.cmake:111 (find_package_handle_standard_args) CMakeLists.txt:1113 (find_package)

-- Configuring incomplete, errors occurred! See also "/Users/mmunuswamy/work/wireshark/build/CMakeFiles/CMakeOutput.log". See also "/Users/mmunuswamy/work/wireshark/build/CMakeFiles/CMakeError.log". bash-3.2$

Any help is greatly appreciated. Thanks in advance

Add a Comment

trying to run 'instruments' and I constantly get asked to install Command Line Tools, even though its already installed. Xcode 13.0 and have CLT selected in the Prefs menu. Very frustrating! 

EDIT: Only think that I've found that works is to use an older version of CLT, Xcode 13.0 but selecting Xcode 10 for CLT in the Prefs. It gives an error, but at least it works. Pretty shoddy from Apple that so many people are having this issue, there are at least 3 Stack Overflow questions about this.

CoreData: annotation: Failed to load optimized model at path '/Applications/Xcode_10.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo' instruments, version 10.0 (64293.19)

install manually from this link https://developer.apple.com/download/all/?q=command%20line%20tools solved my problem

Thanks, mclngl! Saved me a bunch of time. Sad that this is still broken, one year later.

guys this fixed the issue for me -->. sudo xcode-select --switch /Library/Developer/CommandLineTools

Same issue after installing Ventura. A "fix" isn't good enough for me: I want to know why it's happening and/or how I can try to prevent it in the future (seems to be a common problem w/ MacOS upgrades, based on internet searching; it's pathetic that Apple can't fix this!), e.g., should I "hide" a directory by prefixing it with a "." before installing updates and then unhide it afterward? There's got to be a way to prevent this from happening (even if Apple won't figure it out).