cocoapods升级1.9.1之后运行pod install遇到下面问题
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/d/a/2/Alamofire/5.1.0/Alamofire.podspec.json Response: Couldn't connect to server
解决方案: 修改hosts
- 打开终端:输入命令
sudo vi /etc/hosts
- 添加
199.232.4.133 raw.githubusercontent.com
即可 - Podfile不要使用 “source ‘https://github.com/CocoaPods/Specs.git’”
版本1.8以后使用CDN分发,直接找到三方库的spec地址,直接下载。 所以,不再需要全量下载 https://github.com/CocoaPods/Specs.git 到本地。