TIL/Git

[Git] Mac์—์„œ xcrun error ํ•ด๊ฒฐ

Deviloper๐Ÿ˜ˆ 2022. 5. 8. 16:48

์—๋Ÿฌ

์–ด์ œ ์˜ค๋žœ๋งŒ์— ๊ฐœ์ธ ์ปดํ“จํ„ฐ๋ฅผ ์ •๋ฆฌํ•  ์—ฌ์œ ๊ฐ€ ์žˆ์–ด์„œ ํด๋”์™€ ํŒŒ์ผ๋“ค์„ ์ •๋ฆฌํ•˜๊ณ  Mac OS๋ฅผ ์—…๋ฐ์ดํŠธ๋ฅผ ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์˜ค๋Š˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฌธ์ œ๋ฅผ ํ’€์–ด๋ณด๋ ค ํ•˜๋‹ค๊ฐ€ VS Code๋ฅผ ์‹คํ–‰ํ•˜๋‹ˆ ์•„๋ž˜์™€ ๊ฐ™์ด ๋–ด์Šต๋‹ˆ๋‹ค.

Unable to find a Git executable. Either: Set the Visual Studio Code Setting "git.path" to the path and filename of an existing Git executable, or install Git and restart Visual Studio Code.

 

ํ„ฐ๋ฏธ๋„์— ๋“ค์–ด๊ฐ€๋‹ˆ xcrun error ๋•Œ๋ฌธ์ธ ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

[oh-my-zsh] Can't update: not a git repository.

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), 
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

 

 

ํ•ด๊ฒฐ

์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด xcode๋ฅผ ์„ค์น˜ํ•ด์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.

xcode-select --install ์„ ์ž…๋ ฅํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์„ค์น˜ํ•˜์‹œ๊ฒ ๋ƒ๋Š” ํ™”๋ฉด์ด ๋œจ๋ฉด์„œ ์„ค์น˜๊ฐ€ ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค.

 

์„ค์น˜๋ฅผ ํ•˜๊ณ ๋‚˜๋‹ˆ git์„ ๋น„๋กฏํ•œ ๊ฐœ๋ฐœํˆด๋“ค์ด ์ •์ƒ์ ์œผ๋กœ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค.