使用cocopod遇到问题

1.需要安装ruby最新版时安装不上

使用cocopod时,需To install do: 'rvm install "ruby-2.6.0"';运行rvm install "ruby-2.6.0时,遇到:

Error running './configure --prefix=/Users/mc/.rvm/rubies/ruby-2.6.0  --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl@1.1 --disable-install-doc --enable-shared',

please read /Users/mc/.rvm/log/1571023136_ruby-2.6.0/configure.log

There has been an error while running configure. Halting the installation.

解决办法:

1.先运行:xcode-select --install

2.再运行:rvm install "ruby-2.6.0“


2.运行pod install,出现以下问题:

Traceback(most recent call last):

2: from /usr/local/bin/pod:23:in ‘<main>’

1: from /Users/mc/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'

/Users/mc/.rvm/rubies/ruby-2.5.1/lib/ruby/site_ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe':can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)

解决方法:

1、sudo gem update --system

2、gem install cocoapods


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容