我刚刚升级到 CocoaPods 0.37.1 版,现在我在尝试更新我的 GoogleAnalytics 库时遇到错误
在我的播客文件中有
pod 'GoogleAnalytics-iOS-SDK'
现在当我执行
pod update
出现以下错误
[!] Error installing GoogleAnalytics-iOS-SDK [!] /opt/local/bin/curl -f -L -o /var/folders/v_/g79mcljx083bf8rp289mdy7r0000gq/T/d20150527-85393-io5rvl/file.zip https://dl.google.com/googleanalyticsservices/GoogleAnalyticsServicesiOS_3.12.zip --create-dirs
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
我尝试更改我的 podfile 以使用此 pod 但同样的错误
pod 'GoogleAnalytics'
有人知道是什么原因造成的吗?与 v0.37.1 更新有关还是 pod 源有问题?
最佳答案
您的 curl 本身及其 ssl 可能有问题。
我在使用 cocoapods 安装 Google-Maps-iOS-SDK 时遇到了同样的问题,解决方案是删除并重新安装 curl。
如果您使用的是 brew,那么它只是:
brew uninstall curl
brew install curl
brew link curl --force
关于ios - Cocoapods更新GoogleAnalytics sdk返回SSL证书错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30471751/