- Mac M1 pod install 报错解决办法
- Mac M1 CocoaPods 环境问题
- M1 Ruby 环境问题
新到的 MacBook Pro M1,配置如下:
MacBook Pro (13-inch, M1, 2020)
系统:macOS Big Sur
芯片 Apple M1
内存 16 GB
存储空间 500 GB
问题
pod install 报错 in M1
-- 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.
-- Control frame information -----------------------------------------------
c:0035 p:---- s:0231 e:000230 CFUNC :attach
···
[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.
[1] 35542 abort pod install
pod list get 0 pods were found
0 pods were found
解决
1.打开终端显示简介
2.勾选以Rosetta方式打开
3. 运行 sudo gem install cocoapods (之前安装过就略过
4. 运行 sudo gem install ffi
5.最后pod install
试了下还是报错,之后使用了下面的命令
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
arch -x86_64 pod update
之后在pod install 就可以了。
如果还报
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
···
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] 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.3%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+could+not+use+%27%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.3%2Flib%2Fffi_c.bundle%27+because+it+is+not+a+compatible+arch+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.3%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...
- pod install has bug
https://github.com/CocoaPods/CocoaPods/issues/10723 [closed] [9 comments]
a week ago
https://github.com/CocoaPods/CocoaPods/issues/10723 给出了解决办法
Did you try:
sudo arch -x86_64 gem install ffi
And run:
arch -x86_64 pod install instead of pod install.
I hope this will help you.
参考
[1] Running CocoaPods on Apple Silicon (M1)
[2] Got error while trying pod install