๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
macOS

[macOS] : xcrun: error: invalid active developer path ์˜ค๋ฅ˜ ํ•ด๊ฒฐ.

by ๊ถŒ์Šพํ–„ 2023. 7. 9.

 

Xcode ?

apple์˜ macOS, iOS, watchOS ๋ฐ tvOS์šฉ ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ์„ ์œ„ํ•œ IDE์ด๊ณ , macOS ์ „์šฉ์ด๋‹ค.

์–ด์ œ ๋ฐค์— ์†Œํ”„ํŠธ์›จ์–ด ์—…๋ฐ์ดํŠธ๋ฅผ ํ•œ ํ›„์—,

์˜ค๋Š˜ ํ”„๋กœ๊ทธ๋žจ ์ž‘์—…์„ ์ง„ํ–‰ํ•˜๊ธฐ ์œ„ํ•ด์„œ vscode๋ฅผ ์‹คํ–‰์‹œ์ผœ๋ณด๋‹ˆ error๊ฐ€ ๋–ด๋‹ค.

์˜ค๋ฅ˜
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
 

์œ„ ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๋Š” Xcode Command Line Tools๊ฐ€ ์„ค์น˜๋˜์ง€ ์•Š์•˜๊ฑฐ๋‚˜ ์ œ๋Œ€๋กœ ๊ตฌ์„ฑ๋˜์ง€ ์•Š์•˜์„ ๋•Œ ๋ฐœ์ƒํ•˜๋Š” ์˜ค๋ฅ˜์ด๋‹ค.

Xcode Command Line Tools๋Š” macOS์—์„œ ๊ฐœ๋ฐœ์ž ๋„๊ตฌ ๋ฐ ์ปดํŒŒ์ผ๋Ÿฌ์— ์•ก์„ธ์Šคํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ฃผ๋Š” ๋„๊ตฌ ๋ชจ์Œ์ด๋‹ค.

์˜ค๋ฅ˜ ํ•ด๊ฒฐ
  1. ํ„ฐ๋ฏธ๋„์„ ์‹คํ–‰์‹œํ‚จ๋‹ค.
  2. ๋‹ค์Œ ๋ช…๋ น์„ ํ†ตํ•ด์„œ Xcode Command Line Tools๋ฅผ ์„ค์น˜ํ•ด์ค€๋‹ค.
xcode-select --install
 

์œ„ ๋ช…๋ น์„ ์‹คํ–‰ํ•ด์„œ Xcode Command Line Tools ๋ฅผ ์„ค์น˜ํ•˜๊ณ  ์™„๋ฃŒ๋ฅผ ๊ธฐ๋‹ค๋ฆฐ๋‹ค.

 

์„ค์น˜ ํ›„ ์›๋ž˜ ์ž‘์—…์„ ์ง„ํ–‰ํ–ˆ๋”๋‹ˆ ์ด์ƒ์—†์ด ์ง„ํ–‰์ด ๋˜์—ˆ๋‹ค.

์„ค์น˜ ํ›„ ์˜ค๋ฅ˜ ๋ฐœ์ƒ์‹œ

์„ค์น˜ ํ›„์—๋„ ์˜ค๋ฅ˜๊ฐ€ ์ง€์†์ด ๋œ๋‹ค๋ฉด, ๋‹ค์Œ ์ฝ”๋“œ๋ฅผ ํ†ตํ•ด์„œ Xcode Command Line Tools ๊ฒฝ๋กœ๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

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

์œ„ ๋ช…๋ น์€ `/Library/Developer/CommandLineTools` ๊ฒฝ๋กœ์— Xcode Command Line Tools ๋ฅผ ์„ค์ •ํ•œ๋‹ค๋Š” ๋ช…๋ น์–ด์ด๋‹ค.

ํ•ด๋‹น ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ๋‹ค์‹œ ์ž‘์—…์„ ์‹œ๋„ํ•œ๋‹ค๋ฉด

`xcrun` ์˜ค๋ฅ˜ ํ•ด๊ฒฐ์ด ๊ฐ€๋Šฅํ•  ๊ฒƒ์ด๋‹ค.

 

#xcrun #Xcode #์˜ค๋ฅ˜ #์˜ค๋ฅ˜ํ•ด๊ฒฐ

#Xcode_command_line_tools #error