Skip to content

Instantly share code, notes, and snippets.

@1eedaegon
Last active November 27, 2023 12:47
Show Gist options
  • Save 1eedaegon/d486b4c037a2200cb66d39bfdbca80dc to your computer and use it in GitHub Desktop.
Save 1eedaegon/d486b4c037a2200cb66d39bfdbca80dc to your computer and use it in GitHub Desktop.
How to fix: No such file or directory command line tools

Because the CLI binary points to the wrong directory

I got No such file or directory [command line tools] after update MacOS to Sonoma

I got

> make --version
make: error: sh -c '/Users/daegonlee/Downloads/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk '' -find make 2> /dev/null' failed with exit code 17920: (null) (errno=No such file or directory)
xcode-select: Failed to locate 'make', requesting installation of command line developer tools.

Fix

sudo xcode-select -r

Done

 make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

Trials and errors

brew reinstall(x)

brew reinstall make

brew unlink(x)

brew unlink make

gui(x)

  • Install on GUI

xcode update(x)

  • xcode update on app store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment