iOSDevelopment

[!] CDN: trunk Repo update faile

2020-03-18  本文已影响0人  survivorsfyh

当前 CocoaPods 版本为 1.8.4

通过 CocoaPods 执行 pod install 升级项目依赖库的时候,终端执行 install 命令后等待许久抛出了如下异常信息:

[!] CDN: trunk Repo update failed - 40 error(s):
CDN: trunk URL couldn't be downloaded: [https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/7/2/d/GCDWebServer/1.2/GCDWebServer.podspec.json](https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/7/2/d/GCDWebServer/1.2/GCDWebServer.podspec.json), error: execution expired

解决办法

首先,与网络有关也可能与源有关,通过尝试切换网络后异常失败,便尝试切换源配置

$ cd ~/.cocoapods/repos
$ pod repo remove master
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master

其次,变更成功后进入项目工程并配置对应的 podFile 文件
此次尝试了三种 source 属性,具体如下:

source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
#source 'https://github.com/CocoaPods/Specs.git'
#source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

最终采用了 清华大学开源软件镜像站
再其次,配置好如上 source 后,执行如下命令清除当前的 trunk

pod repo remove trunk

最后,再次尝试 pod install 即可


以上便是此次分享的全部内容,希望能对大家有所帮助!

上一篇下一篇

猜你喜欢

热点阅读