본문 바로가기

웹개발/react

react-native 프로젝트 초기 설치 후 error: unable to lookup item 'Path' in SDK 'iphoneos' 간단 해결 방법

react-native 초기 설치 후 ios 폴더에서 "pod install"을 수행하면 아래와 같은 애러를 만나게 됩니다.

hecking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot
checking whether the C compiler works... no
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
/Users/jy/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown `--is-lightweight' option
Try `/Users/jy/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/jy/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
configure: error: C compiler cannot create executables
See `config.log' for more details

 

xcode를 app store에서 설치, 실행한 후 아래 커멘드를 입력해주신 후 다시 아래 커맨드를 입력해주세요.

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

 

이후 다시 pod install을 수행해주시면 정상적으로 실행됩니다.