新电脑 IMac 每次安装 中途都报错 有几次Receiving objects: 0% (16051/3431190), 3.19 MiB | 34.00 KiB/s 这个进度都到99%结果还是直接报错
错误如下
remote: Enumerating objects: 7473, done.
remote: Counting objects: 100% (7473/7473), done.
remote: Compressing objects: 100% (7151/7151), done.
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
于是我全卸载了 重新安装 sudo gem install cocopods 烦银的又来了
sudo gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory
说是没有写入到 /usr/bin directory的权限
于是执行下面命令即可
sudo gem install cocoapods -n /usr/local/bin
提示
Successfully installed cocoapods-1.7.5
Parsing documentation for cocoapods-1.7.5
Installing ri documentation for cocoapods-1.7.5
Done installing documentation for cocoapods after 4 seconds
1 gem installed
根据在网上百度的一些方法进行测试
比如 说缓冲区溢出
git config http.postBuffer 524288000
又比如 当网络比较缓慢 下载断开 使用增加最低速度时间来继续下载
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
昨晚没关电脑回家 失败了 不过今天早上一来 速度达到5M/s 一下子就下好了 还不报错 按照上面设置 应该是可以的