24

**

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?

arpan45
  • 301
  • 1
  • 2
  • 10

3 Answers3

65

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

xcode-select --install
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
rantonio
  • 751
  • 4
  • 3
5

I fixed this problem by reinstalling Xcode.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
arpan45
  • 301
  • 1
  • 2
  • 10
2

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

Redsloth55
  • 61
  • 2