Invalid active developer path on MAC OS X after installing Ruby

前端 未结 11 925
半阙折子戏
半阙折子戏 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:05

    [Update] The steps below are for OS X 10.10 (Yosemite). Those experiencing this because of an upgrade to 10.11 (El Capitan) seem need to only run sudo xcode-select --install as described in the accepted answer.

    I found a suggestion here which indicated

    sudo xcode-select -switch /

    as the fix. However, this threw an error that the developer path was invalid.

    Instead, for me, I modified this to

    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

    (which is a mixture of the two referenced link solutions) and this worked.

    [Edit]

    Try using

    xcode-select --print-path

    to find your developer path if /Applications/Xcode.app/Contents/Developer/ is still invalid for you.

提交回复
热议问题