Mac mini蘋果自研M1電腦安裝cocoapods問題

??其他Homebrew巫财、Ruby糕篇、Gem源更換火诸、cocoapods安裝的時候都是比較順利的,但是就是在pod install 的時候出現(xiàn)了如下錯誤:

Analyzing dependencies

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

``
/usr/local/bin/pod install
``

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

``
   CocoaPods : 1.10.2
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]
    RubyGems : 3.2.24
        Host : macOS 11.1 (20C69)
       Xcode : 12.5.1 (12E507)
         Git : git version 2.30.1 (Apple Git-130)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories :
``

### Plugins

``
cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0
``

### Podfile

``ruby
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
#source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '9.0'
  target 'XXXXX' do


    pod 'AFNetworking'
    pod 'SDWebImage'
    pod 'FMDB'
    pod 'Masonry'
    pod 'MJRefresh'
    pod 'YYWebImage'#, '~> 1.0.5'

end
``

### Error

``
LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi_c.bundle - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi_c.bundle
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi.rb:5:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi.rb:2:in `<top (required)>'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.14.0/lib/ethon.rb:3:in `<top (required)>'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/sources_manager.rb:74:in `cdn_url?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/sources_manager.rb:36:in `create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/sources_manager.rb:21:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer/analyzer.rb:177:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer/analyzer.rb:177:in `sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer/analyzer.rb:1073:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
``

――― 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+missing+compatible+arch+in+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.3%2Flib%2Fffi_c.bundle+-+%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...
 - I can not install pod files.
   https://github.com/CocoaPods/CocoaPods/issues/10718 [closed] [12 comments]
   2 weeks ago

 - pod install: [!] Oh no, an error occurred.
   https://github.com/CocoaPods/CocoaPods/issues/5233 [closed] [12 comments]
   2 weeks ago

也是順著其他開發(fā)者提交的issue找到了解決方法:isuue?它浅,但是我按其所說的解決卻不起作用译柏,因為它一直卡在arch -x86_64 pod install這個命令,因為我添加了清華源(https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
期間我按了好多次ctrl + c(不下20次)姐霍,但咱又不是那種輕易認(rèn)輸?shù)娜吮陕螅唤鉀Q能怎么辦,但是看著那進度條從快到慢到半天不動邮弹,速度從2.x M/s到幾十k/s黔衡,然后不動,那種心情腌乡。host也做了指向盟劫,安裝的時候也去監(jiān)聽了網(wǎng)絡(luò),都沒有問題与纽,就是在安裝的時候死慢侣签,最后\color{#ff0000}{使用自己的手機開了熱點才順利解決}

命令:

$: Install ffi
$: sudo arch -x86_64 gem install ffi
$: arch -x86_64 pod install

總結(jié):

大家在安裝的時候\color{#ff0000}{可直接使用}可直接使用自己的流量開熱點安裝急迂,一切都會順利很多影所,包括homebrew安裝,就是耗電流量僚碎,1~2個G吧猴娩。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子卷中,更是在濱河造成了極大的恐慌矛双,老刑警劉巖,帶你破解...
    沈念sama閱讀 216,372評論 6 498
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件蟆豫,死亡現(xiàn)場離奇詭異议忽,居然都是意外死亡,警方通過查閱死者的電腦和手機十减,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,368評論 3 392
  • 文/潘曉璐 我一進店門栈幸,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人帮辟,你說我怎么就攤上這事速址。” “怎么了由驹?”我有些...
    開封第一講書人閱讀 162,415評論 0 353
  • 文/不壞的土叔 我叫張陵壳繁,是天一觀的道長。 經(jīng)常有香客問我荔棉,道長,這世上最難降的妖魔是什么蒿赢? 我笑而不...
    開封第一講書人閱讀 58,157評論 1 292
  • 正文 為了忘掉前任润樱,我火速辦了婚禮,結(jié)果婚禮上羡棵,老公的妹妹穿的比我還像新娘壹若。我一直安慰自己,他們只是感情好皂冰,可當(dāng)我...
    茶點故事閱讀 67,171評論 6 388
  • 文/花漫 我一把揭開白布店展。 她就那樣靜靜地躺著,像睡著了一般秃流。 火紅的嫁衣襯著肌膚如雪赂蕴。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,125評論 1 297
  • 那天舶胀,我揣著相機與錄音概说,去河邊找鬼。 笑死嚣伐,一個胖子當(dāng)著我的面吹牛糖赔,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播轩端,決...
    沈念sama閱讀 40,028評論 3 417
  • 文/蒼蘭香墨 我猛地睜開眼放典,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起奋构,我...
    開封第一講書人閱讀 38,887評論 0 274
  • 序言:老撾萬榮一對情侶失蹤壳影,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后声怔,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體态贤,經(jīng)...
    沈念sama閱讀 45,310評論 1 310
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,533評論 2 332
  • 正文 我和宋清朗相戀三年醋火,在試婚紗的時候發(fā)現(xiàn)自己被綠了悠汽。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 39,690評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡芥驳,死狀恐怖柿冲,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情兆旬,我是刑警寧澤假抄,帶...
    沈念sama閱讀 35,411評論 5 343
  • 正文 年R本政府宣布,位于F島的核電站丽猬,受9級特大地震影響宿饱,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜脚祟,卻給世界環(huán)境...
    茶點故事閱讀 41,004評論 3 325
  • 文/蒙蒙 一谬以、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧由桌,春花似錦为黎、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,659評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至娃循,卻和暖如春炕檩,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背捌斧。 一陣腳步聲響...
    開封第一講書人閱讀 32,812評論 1 268
  • 我被黑心中介騙來泰國打工捧书, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人骤星。 一個月前我還...
    沈念sama閱讀 47,693評論 2 368
  • 正文 我出身青樓经瓷,卻偏偏與公主長得像,于是被迫代替她去往敵國和親洞难。 傳聞我的和親對象是個殘疾皇子舆吮,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,577評論 2 353

推薦閱讀更多精彩內(nèi)容