Pod安装软件将CDN改为国内的镜像
1、碰到错误
在pod install的时候碰到以下的下载错误:
文字错误如下:
CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/5/b/d/OpenCV/2.4.11/OpenCV.podspec.json Response: Timeout was reached
CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/5/b/d/OpenCV/2.4.9.1/OpenCV.podspec.json Response: Timeout was reached
2、改为国内的镜像
输入如下命令,将的CocoaPods的源改为国内镜像
pod repo remove master
pod repo add master https://gitee.com/CocoaPods/Specs.git
但是,输入第一条命令后,提示如下:
采用pod repo list 来查看当前的源
运行这条语句,pod repo add master https://gitee.com/CocoaPods/Specs.git
会产生如下的错误:
根据测试,https://gitee.com/CocoaPods/Specs.git,此链接已经无法打开。
所以改为了清华的镜像:
pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
运行完毕后,再用pod repo list命令查看结果
这样修改完毕后,上面的错误就没有了。