Flutter m1칩 pod 에러
flutter로 작성한 앱을 아이폰 에뮬레이터에서 구동하려고 하니, 다음과 같은 에러가 발생.
Launching lib/main.dart on iPhone 13 in debug mode...
lib/main.dart:1
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `webview_flutter_wkwebview` from `.symlinks/plugins/webview_flutter_wkwebview/ios`
Resolving dependencies of `Podfile`
Error output from CocoaPods:
↳
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle, 9): no suitable image found. Did find: (LoadError)
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle
터미널에서 ~/ios/ 이동 후 pod install 실행 시 역시나 에러 발생
changho@177802-RedmiBook-Air ios % pod install
Analyzing dependencies
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/library.rb:275: [BUG] Bus Error at 0x00000001022f4000
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
Don't forget to include the above Crash Report log file in bug reports.
인텔칩이 아닌 m1칩 관련 문제
다음 명령어로 gem 설치
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
조치 후 에러 없이 정상작동함.
0개의 댓글