――― 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.4%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+could+not+use+%27%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.4%2Flib%2Fffi_c.bundle%27+because+it+is+not+a+compatible+arch+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.4%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 trunk push issue
https://github.com/CocoaPods/CocoaPods/issues/10994 [closed] [14 comments]
a week agoPod Install Failed on M1
https://github.com/CocoaPods/CocoaPods/issues/10953 [closed] [5 comments]
3 weeks agoUpdate cloud_firestore issue
https://github.com/CocoaPods/CocoaPods/issues/10923 [closed] [8 comments]
a week ago
這里大致是ffi的問題,這是一個兼容性問題,關(guān)于此問題 github有相關(guān)的issue沃粗,目前是開放狀態(tài)袜刷。尚未有最終的結(jié)局方案申窘,但我相信,后面肯定是能解決的。
只是現(xiàn)在不處理這個問題,是無法使用cocopods的盗舰。所以,下面的這個是臨時解決方案桂躏。后續(xù)ffi肯定會從代碼層面適配Apple的M1芯片钻趋。
目前的解決方案是這樣的。
第一步:
首先移除 ffi
sudo gem uninstall ffi
第二步:
在訪達(dá)中找到終端剂习,右鍵顯示簡介蛮位,使用Rostta打開。(需要注意的是使用完Cocoapods之后鳞绕,還需要把Rosetta再調(diào)回來)
第三步:
安裝ffi
sudo gem install ffi
完成之后失仁,就可以執(zhí)行pod install 命令了。
如果還報如以下兩圖的錯誤:
這兩圖之間還打印了很多內(nèi)容猾昆,沒有截取
解決方法:執(zhí)行2條指令
1陶因、sudo arch -x86_64 gem install ffi
打印:
Building native extensions. This could take a while...
Successfully installed ffi-1.15.4
Parsing documentation for ffi-1.15.4
Done installing documentation for ffi after 3 seconds
1 gem installed
再執(zhí)行:
2垂蜗、arch -x86_64 pod install
就好了