Cocoapods 更新 GoogleAnalytics sdk returns 一个 SSL 证书错误
Cocoapods update GoogleAnalytics sdk returns an SSL certificate error
我刚刚升级到 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 更新有关还是 pods 来源的问题?
Cocoapods v0.37.2 现已推出,试试吧!
否则你可以试试这个:
- 如果需要安装 rvm (https://rvm.io/rvm/install)
因此,在控制台中:
rvm osx-ssl-certs 全部更新
pod 设置 --force
pod 安装 --verbose
这对我有用,但我不知道解决方法是哪一步。
您的 curl 本身及其 ssl 可能有问题。
我在使用 cocoapods 安装 Google-Maps-iOS-SDK 时遇到了同样的问题,解决方案是删除并重新安装 curl。
如果您使用的是 brew,那么它只是:
brew uninstall curl
brew install curl
brew link curl --force
我刚刚升级到 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 更新有关还是 pods 来源的问题?
Cocoapods v0.37.2 现已推出,试试吧!
否则你可以试试这个:
- 如果需要安装 rvm (https://rvm.io/rvm/install)
因此,在控制台中:
rvm osx-ssl-certs 全部更新
pod 设置 --force
pod 安装 --verbose
这对我有用,但我不知道解决方法是哪一步。
您的 curl 本身及其 ssl 可能有问题。
我在使用 cocoapods 安装 Google-Maps-iOS-SDK 时遇到了同样的问题,解决方案是删除并重新安装 curl。
如果您使用的是 brew,那么它只是:
brew uninstall curl
brew install curl
brew link curl --force