# Fix the xcrun invalid active developer path error on macOS

> Learn how to fix the xcrun error invalid active developer path on macOS, which appears after a system update, by running xcode-select --install.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2020-01-17 | Topics: [CLI](https://flaviocopes.com/tags/cli/) | Canonical: https://flaviocopes.com/fix-xcrun-error-invalid-active-developer-path/

I recently run into this problem, after updating my macOS version to Catalina.

Trying to update Hugo via Homebrew triggered this error:

```bash
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
```

![Terminal showing Hugo homebrew installation with xcrun error about invalid active developer path](https://flaviocopes.com/images/fix-xcrun-error-invalid-active-developer-path/Screen_Shot_2020-01-03_at_18.31.10.png)

The command was successfully completed, but we don't want errors, right?

Here's what I did to solve it.

In the terminal, I ran:

```bash
xcode-select --install
```

This triggered a dialog box in macOS:

![macOS dialog asking to install command line developer tools with Cancel and Install buttons](https://flaviocopes.com/images/fix-xcrun-error-invalid-active-developer-path/Screen_Shot_2020-01-03_at_18.28.00.png)

After clicking `Install` and accepting the terms, the download started:

![Download progress dialog showing command line tools installation with blue progress bar and time remaining](https://flaviocopes.com/images/fix-xcrun-error-invalid-active-developer-path/Screen_Shot_2020-01-03_at_18.28.31.png)

After the installation finished:

![Installation completion dialog showing The software was installed with Done button](https://flaviocopes.com/images/fix-xcrun-error-invalid-active-developer-path/Screen_Shot_2020-01-03_at_18.35.25.png)

I closed the terminal window and opened a new one.

Problem solved.
