mac下安裝git或者npm install 時遇到xcode-select 識別xcode路徑的問題

在mac下使用git或者npm install 時經常遇到下面的問題:

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`)
 

但是mac下又沒有安裝xcode。此時可以按照下面的步驟,就可以不用安裝xcode就能解決這個問題:

1.xcode-select --install 

2.sudo xcode-select --switch /Library/Developer/CommandLineTools

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