Some applications require compilation tools from Apple Xcode. You can get these from:
- Apple Xcode (6100 MB)
- Apple Command Line Tools (930 MB)
You probably don’t need Xcode, so install the smaller Command Line Tools.
Every version of macOS screws this up. Figure it out.
macOS High Sierra 10.13:
macOS Mojave 10.14
That command doesn’t work anymore. It’ll start to download and encounter “network connectivity issues”.
- Visit the Apple developer downloads website.
- Download this file:
Command Line Tools (macOS 10.14) for Xcode 10.1
- Install it.
xcode-select --install and it should say “already installed”.
macOS Catalina 10.15
Some version of command line tools are already installed, but common Node commands might fail like:
gyp: No Xcode or CLT version detected!
Here’s how to fix it:
xcode-select --install # Says: xcode-select: error: command line tools are already installed, use "Software Update" to install updates xcode-select -print-path # Says: /Library/Developer/CommandLineTools # Delete that rm -rf /Library/Developer/CommandLineTools # Reinstall Xcode xcode-select --install
Sometimes Apple’s software update installs new versions.
When macOS does a major version bump, this will (1) break (2) not be the correct solution anymore.