ios Swift CocoaPods 에러 - You may have encountered a bug in the Ruby interpreter or extension libraries.

doka won·2021년 11월 25일
7

Google Analytics

목록 보기
3/5
post-thumbnail

cocoapod 에서 pod install 하는 도중 에러가 났다.
찾아보니 맥북 M1환경에서 나는 에러라고 한다.

error Message

You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: https://www.ruby-lang.org/bugreport.html

[IMPORTANT]
Don't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.

루비 인터프리터 또는 확장 라이브러리에서 버그 발생...
구글링해서 처음 나온 방법을 시도해봤는데 바로 성공!
방법 공유합니다.

해결

$ sudo arch -x86_64 gem install ffi
$ arch -x86_64 pod install

무튼 이 두가지 명령을 입력하니 해결됐는데, 왜인지 궁금해서 좀 더 찾아봤다.

1) Ruby FFI 라이브러리 업데이트 후 재설치
M1은 arm 기반이라 arch 명령을 수행해보면 arm64 라고 나온단다. 그렇기 때문에 ffi를 설치할 때 아키텍처를 x86_64로 지정하여 설치해야 한다고 함.

2) pod install
그다음에 바로 pod install 명령을 사용하면 아키텍쳐 관련된 호환성 문제(아키텍쳐를 arm64로 인식)가 계속 발생하기 때문에 여기서도 아키텍처를 x86_64로 지정해서 실행해야 된다고 함.

그리고 pod 설치 이후 아래 부분에 나온 문구를 보면
Please close any current Xcode sessions and use firebaseTest.xcworkspace for this project from now on.

=> 현재 Xcode 세션을 종료하고 이제부터 firebaseTest.xcworkspace를 사용하세요.라고 되어있다.

에러 해결은 되었으니 다음단계로 넘어가보자

profile
우당탕탕 개발 오류모음집

1개의 댓글

comment-user-thumbnail
2022년 9월 21일

감사합니다............. 감사합니다............

답글 달기