cocopods fatal: unable to access ''... Failed to connect to localhost port 50321:

举例

 fatal: unable to access 'https://github.com/zhangao0086/DKImagePickerController.git/': Failed to connect to localhost port 50321: Connection refused

解决

  1. 找到cocopods 本地repo 对应DKImagePickerController的文件夹
命令执行
find /Users/xxx/.cocoapods/repos/master -iname DKImagePickerController

输出结果就是路径

/Users/xxx/.cocoapods/repos/master/Specs/1/6/1/DKImagePickerController

打开这个文件路径,找到你要下载的这个DKImagePickerController版本对应的podspec.json文件
检查source是否可访问 有时候需要替换之

之后 pod install

posted @ 2020-11-12 15:23  yxg889  阅读(815)  评论(0编辑  收藏  举报