# macOS: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

**Code:** `xcode-select: error: tool 'xcodebuild' requires Xcode` · **Category:** macOS · **Seen on:** macOS

A command needs the full Xcode app, but `xcode-select` points to the Command Line Tools only.

## Meaning

Install Xcode from the App Store and select it: `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`. Then accept the license (`sudo xcodebuild -license accept`) and run `xcodebuild -runFirstLaunch`. Tools such as `simctl`, `xcodebuild` and iOS builds don't exist in CLT.

## Common causes

- Only CLT installed
- xcode-select pointing to CLT even though Xcode is installed
- Xcode installed under a different name/path
- Multiple Xcode versions
- CI image missing Xcode

## Quick fix

1. `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`
2. `sudo xcodebuild -runFirstLaunch`
3. Install Xcode if absent

## Detailed fix by platform

### macOS

1. `xcode-select -p && ls /Applications | grep Xcode`

## How to diagnose

1. **Active** — CLT or Xcode?
2. **App** — Xcode installed?
3. **First launch** — Components installed?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/macos/xcodebuild-requires-xcode-not-clt)
