cocoa pods 升级遇到的问题

来源:互联网 发布:逆战卡数据教程 编辑:程序博客网 时间:2024/05/18 02:34

1. cocoa pods 升级遇到的问题

  • 运行
    sudo gem update --system
    报错
    Updating rubygems-updateERROR:  While executing gem ... (Errno::EPERM)  Operation not permitted - /usr/bin/update_rubygems
    原因:brew更新或重装的时候导致的我们电脑上没有ruby环境了,需要重新安装一下
    解决方案:安装ruby
    brew install ruby

    2. 执行 pod update 遇到问题

    出现: Performing a deep fetch of themasterspecs repo to improve future performance

解决方案: 删除索引库,重新安装Pod,执行终端命令

rm -rf ~/.cocoapods/repospod setup

3.执行 pod setup 遇到的问题

  [!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master  Cloning into 'master'...  error: RPC failed; result=56, HTTP code = 200  fatal: The remote end hung up unexpectedly  fatal: early EOF  fatal: index-pack failed

解决方案:

   cd 任意的一个使用Git的项目   #执行   git repack --max-pack-size=500m -a -d   pod setup

4. 使用 sudo gem update --system 更新 gem 的时候出错

ERROR:  While executing gem ... (Errno::EPERM)    Operation not permitted - /usr/bin/update_rubygems

解决方案: 重新安装ruby

  1. 安装 Homebrew 一个Mac上用于管理命令行软件的工具

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. 安装ruby

    brew install ruby
  3. 更新 gem
    sudo gem update --system
  4. 安装pod
    sudo gem install -n /usr/local/bin cocoapods
0 0
原创粉丝点击