Could not find proper version of cocoapods (1.11.2) in any of the sources

react-native init AwesomeProject新建RN项目的时候提示说cocoapods安装不了,需要手动进入到iOS项目pod install,但是pod install的时候会报错:

Could not find proper version of cocoapods (1.11.2) in any of the sources
Run `bundle install` to install missing gems.

这时候要运行

bundle install

但是又会报错

Your Ruby version is 2.7.2, but your Gemfile specified 2.7.4

报这个错,安装ruby2.74:

rvm install ruby-2.7.4

再重新bundle install
再重新pod install

你可能感兴趣的:(Could not find proper version of cocoapods (1.11.2) in any of the sources)