missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Failed to clone nvm repo

Viewed 6680

**

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash

**

When I run this code on my Mac I got an error

crun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Failed to clone nvm repo. Please report this!

How to fix this?

3 Answers

I solved this problem by opening the Terminal and running the command:

xcode-select --install

I fixed this problem by reinstalling Xcode.

Open xcode and goto preferences>Locations. Make sure Command Line Tools is installed.

This seems to have corrected my issue (described for others who get it). I have xcode installed and got a similar error when attempting to install a python3 lib psutil (python3 -m pip install psutil) on my Apple M1(mac silicon) Monterey:

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

error: command '/usr/bin/clang' failed with exit code 1

Related