pod install安装第三方库异常
使用pod install安装第三方插件时,可能会出现如下异常:
Installing SDWebImage (3.7.3)
[!] Error installing SDWebImage
[!] /usr/bin/git clone https://github.com/rs/SDWebImage.git /var/folders/n2/hd05fc151kbb41qjbrrrbx2c0000gn/T/d20151109-4159-e0n2lh --single-branch --depth 1 --branch 3.7.3
Cloning into '/var/folders/n2/hd05fc151kbb41qjbrrrbx2c0000gn/T/d20151109-4159-e0n2lh'...
error: RPC failed; result=18, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: unpack-objects failed
此时,解决方法是,在终端运行如下语句
[objc] view plain copy
sudo gem install cocoapods
待运行完成后,在终端再次执行命令
[objc] view plain copy
pod install