看来我的 gcc 坏了。
当我尝试从 PyPI 安装包时出现此错误:
./uwsgi.h:165:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
In file included from core/protocol.c:1:
./uwsgi.h:165:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
已安装 XCode 命令行工具:
➜ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
并且安装了来自 brew 的 gcc:
➜ brew install gcc
Warning: gcc 8.2.0 is already installed and up-to-date
To reinstall 8.2.0, run `brew reinstall gcc`
当我尝试识别使用哪个 gcc 时,我有 /usr/bin/gcc
。我认为它是 XCode 版本。
但是brew中没有gcc二进制文件:
➜ ls /usr/local/bin/gcc-*
/usr/local/bin/gcc-8 /usr/local/bin/gcc-ar-8 /usr/local/bin/gcc-nm-8 /usr/local/bin/gcc-ranlib-8
遇到这种情况我该怎么办?我该如何修复 gcc?
最佳答案
正确答案在此线程中:https://stackoverflow.com/a/52530212/1377912
默认情况下,新的 Xcode 不提供 header 。您应该手动安装它:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
关于macos - macOS Mojave 上的 gcc 损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53028996/