【问题标题】:flutter doctor: why am I getting a curl error?颤振医生:为什么我会出现卷曲错误?
【发布时间】:2018-08-09 02:05:06
【问题描述】:

我正确安装了flutter SDK,但是现在flutter doctor 不工作了。

$ set | grep SSL
SSL_CA_CERT_FILE=/Users/agoyal3/certs/ca.pem
SSL_CA_CERT_PATH=/Users/agoyal3/certs
SSL_CERT_FILE=/Users/agoyal3/certs/server-crt.pem
SSL_KEY_FILE=/Users/agoyal3/certs/server-key.pem

$ pwd
/Users/agoyal3/temp/flutter/bin

$ ./flutter doctor
Downloading Dart SDK from Flutter engine ead227f118077d1f2b57842a32abaf105b573b8a...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://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.

【问题讨论】:

标签: flutter


【解决方案1】:

您的系统可能缺少有效的 SSL 证书。

尝试做:

  1. here下载最新证书

  2. 然后将此设置为 SSL_CA_CERT_PATH 并将文件设置为 SSL_CA_CERT_FILE

希望有帮助!

【讨论】:

    猜你喜欢
    • 2021-01-20
    • 1970-01-01
    • 2021-08-08
    • 1970-01-01
    • 2021-11-11
    • 1970-01-01
    • 2021-11-07
    • 2021-12-04
    相关资源
    最近更新 更多