先pull到最新
运行 sudo gem install cocoapods 升级时,如果失败提示是:
While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
则用这个来升级: sudo gem install -n /usr/local/bin cocoapods
或者which pod 看之前是不是 /usr/local/bin/pod 这个目录