pod install 중 LoadError (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

aborile·2023년 3월 25일
0

삽질기

목록 보기
2/9
post-thumbnail

새로운 라이브러리를 추가한 후 pod install 시 다음과 같은 에러 발생

사용 기기: M1 MacBook Air

LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle' (no such file), '/Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/lib/ffi_c.bundle

해결 방법
sudo arch -x86_64 gem install ffi를 통해 ffi 설치 후
arch -x86_64 pod install 명령어로 설치 진행


M1 칩 사용에 따른 에러라는 건 대충 알겠는데... 인터넷에 나오는 다양한 방법을 시도해 보며 삽질해 보다가 위 방법으로 해결했다.

profile
기록하고 싶은 것을 기록하는 저장소

0개의 댓글