# 安裝最新beta版 sudo gem install cocoapods --pre -n /usr/local/bin # 安裝最新穩定版 sudo gem install cocoapods -n /usr/local/bin
sudo rm -rf /usr/local/bin/pod
,卸載pod命令。xcode
gem list
,查看全部安裝的cocoapods組件,依次刪除,sudo gem uninstall cocoapods-XXX
或者執行如下腳本spa
sudo rm -rf /usr/local/bin/pod ; gem list | grep cocoapods | awk '{print $1}' | while read line; do sudo gem uninstall $line; done
rm -rf Pods Podfile.lock *.xcworkspace && pod install && open *.xcworkspace