Symptom
Running git, make, clang or python3 in Terminal brings up a dialog saying the command requires the command line developer tools and asking whether to install them. Or Terminal prints xcrun: error: invalid active developer path.
Possible causes (most common first)
- The command line developer tools have never been installed on this Mac. Apple's documentation says that on a fresh macOS install, the first call to a command such as git makes the system offer to download and install them.
- After a macOS upgrade, the previously installed tools package is not compatible with the new system and needs to be reinstalled or updated.
- The currently selected developer directory points to an Xcode that has been deleted or moved.
Troubleshooting steps (easiest first)
Run the install command, then click Install on the remote desktop
Run
xcode-select --installin Terminal. The command only starts the request; the actual install dialog appears in the graphical interface. You need to see it through the remote desktop, click Install, accept the licence agreement and click Done when it finishes. If a tool such as Claude Code is running the command in a terminal on your behalf, it cannot see or click that window and the command seems to do nothing. Connect to the desktop and click it yourself. Steps are in the Apple developer documentation.Verify the installation
xcode-select -pprints the current developer directory; the standalone tools package lives at/Library/Developer/CommandLineTools. Then confirm thatgit --versionandclang --versionproduce normal output. To find out which version is installed, Apple's documentation givespkgutil --pkg-info=com.apple.pkg.CLTools_Executables.If the dialog's download fails, use the installer package
If the download in the dialog fails repeatedly, sign in to the downloads page on the Apple Developer website, search for Command Line Tools, and download and install the version that matches your current macOS by hand. Only one version of the tools package can be installed on a Mac at a time.
If full Xcode is installed
With Xcode installed you do not need this package separately; Xcode ships the same tools. Commands such as
xcodebuild, however, come only with full Xcode and are not in the standalone package. If the path printed byxcode-select -pno longer exists, point it at Xcode again withxcode-select -sfollowed by Xcode's path. That command has to be run as an administrator; enter this Mac's login password when asked.Keep it updated, but do not upgrade macOS along the way
New versions of the tools package appear in System Settings → General → Software Update. You can update just the Command Line Tools item. Do not click the macOS upgrade on the same page at the same time; contact support before upgrading the system.
When to contact support directly
If both the install dialog and the manual package fail, or you still get invalid active developer path after installing, contact support on Contact support. Include your machine ID, macOS version, the output of xcode-select -p and the exact error text. If you see no dialog at all on the remote desktop and suspect the window is hidden, also say which remote connection method you are using.
Related
- Can I install Node, Homebrew and Docker on a rented Mac mini myself?
- Remote Mac mini for heavy Claude Code use: an always-on workstation, not account insurance
- Homebrew install fails with Permission denied on a rented Mac, or brew: command not found
- A macOS update prompt appeared on my rented Mac: should I click Update Now?
- Coding on a remote Mac mini: remote desktop or terminal?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support