Flutter 升级新版本遇到ProcessException: Process exited abnormally

今天升级Flutter的时候发生了报错,具体错误信息如下:

ProcessException: Process exited abnormally:
fatal: unable to access 'https://github.com/flutter/flutter.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
  Command: git fetch --tags

根据调查应该是使用了代理的问题导致的,解决方案:

  1. 先使用git config --global --add remote.origin.proxy命令关闭代理;
  2. 再执行flutter upgrade命令执行升级。

示例如下:

git config --global --add remote.origin.proxy ""
flutter upgrade

执行以上命令后,问题就能顺利解决了,您将看到以下信息:

Upgrading Flutter to 2.0.6 from 2.0.1 in /Users/tyyod/Library/flutter...
Downloading Dart SDK from Flutter engine 05e680e202af9a92461070cb2d9982acad46c83c...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0  194M    0  510k    0     0   321k      0  0:10:20  0:00:01  0:10:19  321k
  0  194M    0 1787k    0     0   691k      0  0:04:48  0:00:02  0:04:46  690k
  1  194M    1 3519k    0     0   981k      0  0:03:23  0:00:03  0:03:20  981k
  2  194M    2 5607k    0     0  1222k      0  0:02:43  0:00:04  0:02:39 1221k
  4  194M    4 8163k    0     0  1460k      0  0:02:16  0:00:05  0:02:11 1660k
  5  194M    5 10.4M    0     0  1628k      0  0:02:02  0:00:06  0:01:56 2043k
  6  194M    6 13.3M    0     0  1800k      0  0:01:50  0:00:07  0:01:43 2375k
  8  194M    8 16.6M    0     0  1979k      0  0:01:40  0:00:08  0:01:32 2694k
 10  194M   10 19.7M    0     0  2109k      0  0:01:34  0:00:09  0:01:25 2924k
 11  194M   11 22.9M    0     0  2216k      0  0:01:29  0:00:10  0:01:19 3062k
 13  194M   13 27.1M    0     0  2401k      0  0:01:22  0:00:11  0:01:11 3419k
 16  194M   16 31.8M    0     0  2595k      0  0:01:16  0:00:12  0:01:04 3800k
 19  194M   19 37.5M    0     0  2832k      0  0:01:10  0:00:13  0:00:57 4297k
 22  194M   22 43.8M    0     0  3079k      0  0:01:04  0:00:14  0:00:50 4939k
 25  194M   25 50.1M    0     0  3294k      0  0:01:00  0:00:15  0:00:45 5576k
 29  194M   29 57.7M    0     0  3564k      0  0:00:55  0:00:16  0:00:39 6259k
 33  194M   33 65.0M    0     0  3786k      0  0:00:52  0:00:17  0:00:35 6784k
 37  194M   37 73.4M    0     0  4049k      0  0:00:49  0:00:18  0:00:31 7358k
 41  194M   41 80.9M    0     0  4233k      0  0:00:47  0:00:19  0:00:28 7600k
 44  194M   44 86.9M    0     0  4322k      0  0:00:46  0:00:20  0:00:26 7519k
 48  194M   48 93.5M    0     0  4439k      0  0:00:44  0:00:21  0:00:23 7340k
 52  194M   52  101M    0     0  4594k      0  0:00:43  0:00:22  0:00:21 7436k
 55  194M   55  108M    0     0  4692k      0  0:00:42  0:00:23  0:00:19 7084k
 59  194M   59  115M    0     0  4795k      0  0:00:41  0:00:24  0:00:17 6994k
 61  194M   61  119M    0     0  4790k      0  0:00:41  0:00:25  0:00:16 6722k
 63  194M   63  123M    0     0  4744k      0  0:00:41  0:00:26  0:00:15 6064k
 66  194M   66  129M    0     0  4825k      0  0:00:41  0:00:27  0:00:14 5868k
 70  194M   70  136M    0     0  4893k      0  0:00:40  0:00:28  0:00:12 5838k
 73  194M   73  143M    0     0  4974k      0  0:00:40  0:00:29  0:00:11 5852k
 77  194M   77  151M    0     0  5063k      0  0:00:39  0:00:30  0:00:09 6460k
 81  194M   81  158M    0     0  5140k      0  0:00:38  0:00:31  0:00:07 7240k
 85  194M   85  166M    0     0  5232k      0  0:00:38  0:00:32  0:00:06 7476k
 89  194M   89  174M    0     0  5312k      0  0:00:37  0:00:33  0:00:04 7711k
 93  194M   93  181M    0     0  5388k      0  0:00:36  0:00:34  0:00:02 7839k
 97  194M   97  190M    0     0  5467k      0  0:00:36  0:00:35  0:00:01 7943k
100  194M  100  194M    0     0  5515k      0  0:00:36  0:00:36 --:--:-- 8135k
Building flutter tool...


Upgrading engine...
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Downloading android-arm-profile/darwin-x64 tools...              1,337ms
Downloading android-arm-release/darwin-x64 tools...              1,275ms
Downloading android-arm64-profile/darwin-x64 tools...            1,729ms
Downloading android-arm64-release/darwin-x64 tools...              941ms
Downloading android-x64-profile/darwin-x64 tools...                763ms
Downloading android-x64-release/darwin-x64 tools...              1,611ms
Downloading android-x86 tools...                                    4.8s
Downloading android-x64 tools...                                    4.9s
Downloading android-arm tools...                                 2,490ms
Downloading android-arm-profile tools...                         1,158ms
Downloading android-arm-release tools...                           865ms
Downloading android-arm64 tools...                               1,884ms
Downloading android-arm64-profile tools...                       1,117ms
Downloading android-arm64-release tools...                         994ms
Downloading android-x64-profile tools...                         1,184ms
Downloading android-x64-release tools...                         1,626ms
Downloading android-x86-jit-release tools...                        6.0s
Downloading ios tools...                                           11.6s
Downloading ios-profile tools...                                    7.6s
Downloading ios-release tools...                                   32.9s
Downloading Web SDK...                                              6.2s

Flutter 2.0.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1d9032c7e1 (7 days ago) • 2021-04-29 17:37:58 -0700
Engine • revision 05e680e202
Tools • Dart 2.12.3

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.6, on Mac OS X 10.15.7 19H524 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2020.3.3)
[✓] VS Code (version 1.54.3)
[✓] Connected device (2 available)

• No issues found!

你可能感兴趣的:(Flutter 升级新版本遇到ProcessException: Process exited abnormally)