我这台设备是2020款M1 Mac mini
,macOS 11.2.3
。在使用Cocoapods的时候如下报错:
[!] 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.0%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+missing+compatible+arch+in+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%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!
Looking for related issues on cocoapods/cocoapods...
- missing compatible arch in ...
https://github.com/CocoaPods/CocoaPods/issues/10541 [open] [3 comments]
3 weeks ago
- I got error when doing pod install, something to do with M1 chip
https://github.com/CocoaPods/CocoaPods/issues/10569 [open] [2 comments]
5 days ago
- CocoaPods compatibility with Apple DTK (Apple Silicon)
https://github.com/CocoaPods/CocoaPods/issues/9907 [open] [103 comments]
a week ago
通过文字翻译得知,在这里面把报错可能的解决方案已经给到了。我们是M1芯片所以属于以下问题方案:
- I got error when doing pod install, something to do with M1 chip
https://github.com/CocoaPods/CocoaPods/issues/10569 [open] [2 comments]
5 days ago
解决方案
在Finder -> 应用程序中找到 -> 终端。
前将终端的运行方式设置为:使用Rosetta打开
然后再终端执行pod install
。
需要注意的是使用完Cocoapods
之后,还需要把Rosetta
再调回来。