Unable to find a specification for `xxxxx (~> x.x.x)` depended upon by Podfile. 
Unable to find a specification for `xxxx` 
需要把当前Pod的目录清理一下就行了。在终端执行以下命令:
 
pod repo remove master
pod setup 
setup成功后执行
 
pod install 或
pod update 
即可。
 
遇到pod install或者pod update长时间卡在Updating local specs repositories
 
常见的解决方式是跳过更新cocoapods的spec仓库
 
pod install  --verbose --no-repo-update
pod update --verbose --no-repo-update 
 
 
解决代理产生的Failed to connect to 127.0.0.1 port 54517: Connection refused问题
 
Failed to open TCP connection to 127.0.0.1:54517 (Connection refused - connect(2) for "127.0.0.1" port 54517)
 
查询代理
 
$ env|grep -I proxy
$ http_proxy=127.0.0.1:54517
$ https_proxy=127.0.0.1:54517
 
取消代理
 
$ unset http_proxy
$ unset https_proxy
$ env|grep -I proxy
未输出任何结果 
 
 
然后再次尝试:
 
pod install  
成功解决问题。