如何修复“ flutter run”上的“错误:无法执行'gcc-5'(没有此类文件或目录)”?

时间:2019-02-11 21:45:41

标签: macos flutter gcc5

我当前正在设置系统以防抖动。我按照https://flutter.io/docs/get-started/install/macos的指示进行操作,但收到错误消息

error: can't exec 'gcc-5' (No such file or directory)

在输入“颤动”时。

我有一个安装Mac OS 10.14.2的MacBook Air,试图安装flutter 1.0.0。我在终端中使用zsh。我在机器上检查了gcc-5,但找不到它(只有不带-5的gcc似乎可用)。我还在网上和自制软件中查看了gcc-5,但令人惊讶的是没有找到任何直接有用的信息。我还将这两个Xcode bin文件夹添加到zsh路径:

export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH

似乎无济于事(这很明显,因为这些文件夹中没有gcc-5)。

完整的控制台输出如下:

➜  test_app git:(master) flutter run
Launching lib/main.dart on iPhone XR in debug mode...
Starting Xcode build...                                          
 ├─Assembling Flutter resources...                    1,7s

 └─Compiling, linking and signing...                  0,2s

Xcode build done.                                            4,5s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    error: can't exec 'gcc-5' (No such file or directory)
    Command gcc-5 failed with exit code 71
    error: can't exec 'gcc-5' (No such file or directory)
    Command gcc-5 failed with exit code 71
    error: can't exec 'gcc-5' (No such file or directory)
    Command gcc-5 failed with exit code 71

如何安装gcc-5或需要做其他事情?

0 个答案:

没有答案