升级OS X EI Capitan之后,发现CocoaPods的pod无效了,运行pod后显示:"pod: command not found"的错误。
解决步骤:
1.为了安全起见,执行命令"sudo gem uninstall cocoapods",卸载原有的CocoaPod
2.执行命令"sudo gem install -n /usr/local/bin cocoapods"来重新安装cocoapod
3.如果没有权限执行pod,执行命令"sudo chmod +rx /usr/local/bin/",赋予/usr/local/bin给予执行与读取权限
参考链接:https://github.com/CocoaPods/CocoaPods/issues/3736
sudo gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
sudo gem update --system
sudo gem install -n /usr/local/bin cocoapods
pod repo add aaa xxxxx.git
pod repo remove master
mkdir -p ~/.cocoapods/repos/master/.git/
echo '[remote "origin"] url = https://github.com/CocoaPods/Specs.git' >> ~/.cocoapods/repos/master/.git/config
pod repo update
其他
pod repo path:
~/.cocoapods/
移除gem源
sudo gem sources --remove [https://rubygems.org/]
卸载:
sudo rm -rf /usr/local/bin/pod
sudo gem uninstall cocoapods -v 0.[x].0
升级:
pod repo update [--verbose]
podfile安装:
pod install [--verbose --no-repo-update]
pod update [--verbose --no-repo-update]
软链
ln -s ~/.cocoapods/repos/tctravel ~/.cocoapods/repos/master