LoginSignup
14

More than 5 years have passed since last update.

macOS High Sierraでcocoapodsが使えなかった話(解決)

Last updated at Posted at 2017-08-13

問題

・macOS High SierraをインストールしたMacでpodのインストールをしようとしたところ、エラー

ログ
KentaroAbe-no-MacBook-Pro:bin KentaroAbe$ sudo vim pod
KentaroAbe-no-MacBook-Pro:bin KentaroAbe$ pod install
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

原因

・Rubyのバージョンが違う

GitHubに該当記事があった(公開からだいぶ経ってGitHubであるべき表示がStackOverFlowになってるのに気づいた)
別記事によれば、前にrubyバージョンが上がったのはMavericks以来で実に4年ぶりだそうな

The reason seems to be change of system ruby version to 2.3. The path is moved to /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin.

解決策

sudo gem update --systemを実行して、その上でsudo gem install cocoapods
私は一応cocoapodsを一旦削除したが、果たして必要だったのかは定かではない

余談

GitHubに上がってた別の質問があったが、何故か上手く行かなかった
 
 
 
案外単純な解決策でしたが、誰かの参考になればと

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
14