【问题标题】:_ctermid.h: No such file or directory error on mac without Xcode_ctermid.h:没有 Xcode 的 mac 上没有这样的文件或目录错误
【发布时间】:2021-05-01 21:14:45
【问题描述】:

我试图使用 gcc 10.2.8 编译我的代码,但我收到了这个错误:

scons: *** [S.os] Error 1
In file included from /usr/local/Cellar/gcc/10.2.0_2/include/c++/10.2.0/cstdio:42,
                 from Public_Library/C.h:10,
                 from Public_Library/D.h:11,
                 from Public_Library/RS.h:10,
                 from Projects/S/main.cpp:1:
/usr/local/Cellar/gcc/10.2.0_2/lib/gcc/10/gcc/x86_64-apple-darwin18/10.2.0/include-fixed/stdio.h:219:10: fatal error: _ctermid.h: No such file or directory

我发现了一些这样的问题,但问题是我的 Mac 上没有 Xcode,而且我已经多次更新了我的命令行工具,但它没有工作。 顺便说一句,我使用的是 OSX 10.14.6。

【问题讨论】:

标签: c++ macos gcc


【解决方案1】:

我只是要添加它以防它可能对其他人有所帮助。我将我的 OSX 更新为大确定并安装了 Xcode,但这并没有帮助。为我解决问题的是使用以下命令获得一个不浅版本的 brew: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow

然后更新和升级我的 brew。

brew update

brew upgrade

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-10
    • 2021-04-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多