tool: xcode-select

$ sudo rm -rf /Applications/Xcode.app

這之後,運行git,報錯了

$ git
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer/") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select)

solve:

原因是Xcode不存在了。安裝一個試試

$ xcode-select --install
xcode-select: error: command line tools are already installed, use “Software Update” to install updates
如是,查看提示後,切換達到另外一個環境OK

$ sudo xcode-select --switch /Library/Developer/CommandLineTools/

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章