macos,

macOS: xcrun: error: invalid active developer path

Dec 16, 2022 · 1 min read · Post a comment

Yesterday I’ve tried to spin up some Git cloned Golang project for fun, and while trying to run make worker, I’ve received the following error in the console output: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun.

Prerequisites

  • macOS

Solution

Open Terminal and run:

sudo xcode-select --install

In short, you need to install / update the so-called Xcode Command Line Tools. Think of it as a complete development environment for developers. So, if you are a developer or an Ops guy, you’ll most likely need it.

Apparently, this happens quite frequently, at least for me, after every major macOS release update, whenever compiling and building Golang projects, or any other build from source tool.

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.