扑医生:为什么我会出现卷曲错误?

时间:2018-03-01 03:49:21

标签: flutter

我正确地安装了flutter SDK,但是现在告诉医生没有工作。

$ 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.

1 个答案:

答案 0 :(得分:1)

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

尝试做:

  1. here

  2. 下载最新证书
  3. 然后将其设置为SSL_CA_CERT_PATH,将文件设置为SSL_CA_CERT_FILE

  4. 希望有所帮助!