CocoaPods 安装卸载

建议升级10.15的系统,什么都装好了
sudo gem install cocoapods

pod setup
搞定
不能有search命令,可以pod init,下载用的是cdn,打开项目正常使用

问题:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

解决方案:

1.缓存区溢出curl的postBuffer的默认值太小,需要增加缓存,使用git命令增大缓存(单位是b,524288000B也就500M左右)

git config --global http.postBuffer 524288000

2.网络下载速度缓慢

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999

3.以上两种方式依旧无法clone下,尝试以浅层clone,然后更新远程库到本地

git clone --depth=1 http://xxx.git
git fetch --unshallow

使用git config --list查看1、2是否生效


问题:

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60

fatal: the remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

 

解决方案:

ping失败

ping github.com

修改host

sudo vim /private/etc/hosts

复制下面这段

#140.82.114.4 github.com
#140.82.113.4 github.com
#192.30.253.112 github.com
#151.101.185.194 github.global.ssl.fastly.net
#69.171.224.40 github.global.ssl.fastly.net
#185.199.109.153 assets-cdn.github.com
#185.199.110.153 assets-cdn.github.com
#185.199.111.153 assets-cdn.github.com
#151.101.184.133 avatars0.githubusercontent.com
#151.101.112.133 avatars1.githubusercontent.com

140.82.114.3 github.com
140.82.114.4 www.github.com
199.232.5.194 github.global.ssl.fastly.net
185.199.108.153 assets-cdn.github.com
199.232.68.133 avatars0.githubusercontent.com



保存后再ping是否成功,不成功继续改ip,https://www.ipaddress.com/,http://tool.chinaz.com/dns/

然后,设置下xcode
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
 

https://www.jianshu.com/p/f43b5964f582?utm_campaign=haruki

https://www.jianshu.com/p/4ed3645a410a
https://www.jianshu.com/p/ddc40e71210d
https://www.cnblogs.com/dins/p/cocoapods.html
https://www.cnblogs.com/niudaben/p/12503650.html
https://blog.csdn.net/qq_41629150/article/details/97250690

sudo
gem update --system gem sources -l gem sources --remove https://rubygems.org/ gem sources -a https://gems.ruby-china.com/ # 安装最新beta版 sudo gem install cocoapods --pre -n /usr/local/bin # 安装最新稳定版 sudo gem install cocoapods -n /usr/local/bin pod setup #卸载 sudo rm -rf /usr/local/bin/pod gem list sudo gem uninstall cocoapods-XXX sudo rm -rf /usr/local/bin/pod ; gem list | grep cocoapods | awk '{print $1}' | while read line; do sudo gem uninstall $line; #Xcode rm -rf Pods Podfile.lock *.xcworkspace && pod install && open *.xcworkspace

 

 

posted @ 2019-03-31 11:10  南溟之巅  阅读(167)  评论(0编辑  收藏  举报