본문 바로가기
flutter

[Flutter] flutter doctor 에서 CocoaPods not installed 이슈 해결하기

by run() 2021. 1. 18.

flutter doctor 로 플러터 개발 환경을 구성하던 중 에러를 마주하고 해결한 기록이다.

 

 

에러 상황 정리

 

[!] Xcode - develop for iOS and macOS (Xcode 12.3)

    ✗ CocoaPods not installed.

 

 

위 메시지를 보고 sudo gem install cocoapods 으로 CocoaPods를 설치하려 시도했는데 다음과 같은 에러가 발생했다.

 

 

To see why this extension failed to compile, please check the mkmf.log which can be found here:

 

  /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/mkmf.log

 

 

해결 방법

 

루비 버전을 2.7.2로 업데이트하면 해결할 수 있다. 업데이트는 다음과 같이 진행하면 된다.

 

1. 루비 버전 매니저(rvm) 받기

 

curl -L https://get.rvm.io | bash -s stable

 

 

2. 환경변수 등록

 

source /Users/<username>/.rvm/scripts/rvm

 

 

3. 루비 2.7.2 버전 설치

 

rvm install ruby-2.7.2

 

 

 

 

'flutter' 카테고리의 다른 글

flutter에서 iOS 빌드 안될 때 해결하는 방법  (0) 2021.05.10

댓글