0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

pod installでエラーが出た(M2 Mac)

Posted at

macでpod installをするときに長文でエラー吐かれたのですが、調べた感じM2モデルのMacで出るエラーのため対策法をまとめます

Rubyの最新バージョンをインストールする

やり方は任せますが、今回はrbenvを用いてRubyをダウンロードしました

Rubyのインストールできるバージョンを確認

rbenv install -l

最新バージョンをインストール

rbenv install <バージョン>

バージョン確認

ruby -v

※Rubyのバージョンが古い場合には、参照先を切り替えてください

vi ~/.bash_profile
export PATH="~/.rbenv/shims:/usr/local/bin:$PATH"
eval "$(rbenv init -)"
source ~/.bash_profile

必要なモジュールのインストール

cocoapodsをインストールする
どのコマンドでも先頭に「arch -x86_64」をつける必要がある(これが何者なのかはあまりわかってない。。。)

arch -x86_64 sudo gem install cocoapods

ffiをインストールする

arch -x86_64 sudo gem install ffi

pod installする

arch -x86_64 pod install

以上で、Podsフォルダに対象のフォルダが作成されてたら成功です

参考

Rubyのバージョンが切り替わらない時の対処法!

Got error while trying pod install

macOSで最新バージョンのRubyをインストールする方法

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?