sudo gem install -n /usr/local/bin cocoapods 参考链接: Cannot install cocoa pods after uninstalling, results in error