Invalid active developer path on MAC OS X after installing Ruby

前端 未结 11 931
半阙折子戏
半阙折子戏 2020-11-29 02:48

I get this error:

xcrun: error: invalid active developer path (/Applications/Xcode.app), missing xcrun at: /Applications/Xcode.app/usr/bin/xcrun

11条回答
  •  粉色の甜心
    2020-11-29 03:04

    I know this is quite old but I got the same issue and then I fixed it by doing couple more extra steps. Problem came when Terminal could not find the actual path of the Command Line Tools.

    1. If you had Xcode and then removed it, then Terminal is referring to the Command Line Tools inside the Xcode folder. Try using this command and check what your path is, xcode-select --print-path. This would most likely print /Applications/Xcode.app/Contents/Developer.
    2. Now to fix this, reinstall the command line tools for xcode. Initially remove any previous installations using sudo rm -rf /Library/Developer/CommandLineTools.
    3. Then install the command line tools sudo xcode-select --install Now the final step, change the path for the CLT to the actual path using sudo xcode-select -switch /Library/Developer/CommandLineTools/ this will fix it.

提交回复
热议问题