아요 개발 일기

[CocoaPods Error] You may have encountered a bug in the Ruby interpreter or extension libraries. 본문

iOS

[CocoaPods Error] You may have encountered a bug in the Ruby interpreter or extension libraries.

소진이 2023. 1. 10. 10:45

안녕하세요!

노트북을 Macbook Pro M1으로 바꾸고 난 후에 pod install을 하니까 아래와 같은 오류가 뜨더라고요!

같이 해결해봅시다 ㅎㅎ 

 

Error 

[NOTE]
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.

 

 

해석해보면 Ruby 인터프리터 또는 확장 라이브러리에서 버그가 발생했다고 하네요!!

해당 버그는 맥북 M1 환경에서 나는 에러라고 합니다

 

 

이제 해결하러 가봅시당ㅎㅎ

 

해결

$ 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로 지정해서 실행해야합니다.

 

이제 잘 실행되네요 ㅎㅎ

 

참고 블로그 

ondemand

'iOS' 카테고리의 다른 글

[iOS] Foundation  (0) 2023.01.29
[iOS] TestFlight 업로드 시 수출 규정 관련 문서 누락  (2) 2023.01.10
[Xcode] Xcode 단축어 정리  (0) 2023.01.10
[iOS] App의 생명주기 (Life Cycle)  (0) 2023.01.10
[iOS] Moya를 이용한 네트워킹  (1) 2023.01.06