플러터 Flutter

맥북(M1칩) 플러터 cocoapods 설치에러 문제해결하기

dev.mk 2021. 7. 15. 11:10
반응형

m1칩 맥에서 빌드할때 에러발생 CocoaPods's specs repository is too out-of-date to satisfy dependencies

 

플러터를 m1칩에서 빌드하려다가 계속 에러가남.. 최신 루비가 설치안되서 그런 것 같았다.

Ruby를 설치하려고 cocoapods를 설치하다가 계속 에러가 발생하는 상황

Ruby의 ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19] 경우 버전 을 사용중에

시스템을 업데이트하려고 하면 sudo gem update --system"최신 버전이 이미 설치되었음" 라고 표시되고 설치가 안됨

에러...

Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/xcodeproj Target /usr/local/bin/xcodeproj already exists. You may want to remove it: rm '/usr/local/bin/xcodeproj' To force the link and overwrite all conflicting files: brew link --overwrite cocoapods To list all files that would be deleted: brew link --overwrite --dry-run cocoapods Possible conflicting files are: /usr/local/bin/xcodeproj

오류를 일으킨 명령어..

sudo gem install -n /usr/local/bin cocoapods

 

플러터 앱의 /ios 폴더로 이동한다.

 

pod관련 파일을 삭제해주자.

rm ios/Podfile
rm ios/Podfile.lock
rm -rf ios/Pods
flutter clean
flutter pub get

ffi설치하기.

sudo arch -x86_64 gem install ffi

pod 의존성 재설치.

arch -x86_64 pod install

이제 빌드하면 된다~

반응형