[Flutter / Mac M1] CocoaPods's specs repository is too out-of-date to satisfy dependencies 에러 해결법

Jemma·2022년 2월 4일
0

Flutter Diary

목록 보기
1/3

참고 : Stack Overflow : iOS - Flutter

# 문제상황

Flutter와 Firebase를 연동하기 위해 pub.get 까지 마친 상황. flutter run 으로 iOS simulator를 돌렸는데 잘 돌아가던 게 다음과 같은 에러가 뜨면서 작동이 정지됨.

In Podfile: 
firebase_storage (from `.symlinks/plugins/firebase_storage/ios`) was
resolved to 10.2.5, which depends on
Firebase/Storage (= 8.11.0)

You have either:
  * out-of-date source repos which you can update with `pod repo update` 
  or with `pod install --repo-update`.
  * changed the constraints of dependency `Firebase/Storage` inside your development pod `firebase_storage`.
 You should run `pod update Firebase/Storage` to apply changes you've made.

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update

Firebase - Flutter 연동이 아직은 불안정해서 iOS 기기 연동은 일정 버전 이상에서만 된다고 얼핏 들은 기억이 남.


뭐 결국 업데이트 하라는 말. 아 오케이 오케이. 하고 위에서 제시한 대로

pod install --repo-update 로 업데이트를 시도하니까 또 다른 에러가 발생함.

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.5%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+tried%3A+%27%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.5%2Flib%2Fffi_c.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27x86_64%27%2C+need+%27arm64e%27%29%29%2C+%27%2Fusr%2Flib%2Fffi_c.bundle%27+%28no+such+file%29+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.5%2Flib%2Fffi_c.bundle&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!


갑자기 Github 이슈 ? 몇 번 시도해 보고나서야 뭔가 잘못되었음을 깨달음.



# 해결법

1. 프로젝트 내 iOS 폴더 > Podfile.lock 삭제

2-1. Mac (intel):

❶ 터미널을 열고 현재 위치를 프로젝트 내 iOS 폴더로 이동
pod install --repo-update 로 업데이트 실행
flutter run 으로 실행

2-2. Mac (M1):

❶ 터미널을 열고 관리자 모드로 ffi 설치 (Mac 비번 입력) :
sudo arch -x86_64 gem install ffi

arch -x86_64 pod install --repo-update 로 업데이트 실행

flutter clean 으로 비워준 후 다시 flutter run 으로 재실행

3. pod repo remove trunk 로 실행 삭제 - 끝 -



위의 방법대로 했더니 업데이트 성공.

예전부터 느끼는 바지만 M1을 쓰면서 왠지 구글링 실력과 편법만 느는 것 같다 ㅎㅎㅎ

profile
꽃길만 걸어요 우리

0개의 댓글