1. cocoa pods 升級遇到的問題
- 運(yùn)行
sudo gem update --system
報(bào)錯(cuò)
Updating rubygems-update
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/update_rubygems
原因:brew更新或重裝的時(shí)候?qū)е碌奈覀冸娔X上沒有ruby環(huán)境了,需要重新安裝一下
解決方案:安裝ruby
brew install ruby
2. 執(zhí)行 pod update 遇到問題
出現(xiàn): Performing a deep fetch of the
masterspecs repo to improve future performance
解決方案: 刪除索引庫,重新安裝Pod,執(zhí)行終端命令
rm -rf ~/.cocoapods/repos
pod setup
3.執(zhí)行 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 任意的一個(gè)使用Git的項(xiàng)目
#執(zhí)行
git repack --max-pack-size=500m -a -d
pod setup
4. 使用 sudo gem update --system
更新 gem 的時(shí)候出錯(cuò)
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/update_rubygems
解決方案: 重新安裝ruby
- 安裝 Homebrew 一個(gè)Mac上用于管理命令行軟件的工具
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- 安裝ruby
brew install ruby
- 更新 gem
sudo gem update --system
- 安裝pod
sudo gem install -n /usr/local/bin cocoapods