当前位置: 代码迷 >> 综合 >> CocoaPods - 解决pod install报错问题(...bin/ruby: bad interpreter: No such file or directory)
  详细解决方案

CocoaPods - 解决pod install报错问题(...bin/ruby: bad interpreter: No such file or directory)

热度:50   发布时间:2023-12-20 22:59:56.0

当Mac升级版本的时候 会出现以上问题

解决
1 先查看gem源

gem sources -l

如果是.org结尾的需要改成.com

2 删除原来的源

gem sources --remove https://gems.ruby-china.org/

注 https://gems.ruby-china.org/ 这个是刚才搜到的gem

3 添加新的源

gem sources -a https://gems.ruby-china.com

4 更新gem

sudo gem update --system

5 最后安装CocoaPods

sudo gem install -n /usr/local/bin cocoapods --pre

 

  相关解决方案