macos - 如何在 macOS 10.13 上安装 gcc@7?

标签 macos gcc homebrew macos-high-sierra

<分区>

我使用 homebrew 在 macOS 10.13 high sierra 上安装 gcc,但出现以下错误消息:

-> brew install gcc

==> Using the sandbox

==> Downloading http_s://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.bz2
Already downloaded: /Users/xxxx/Library/Caches/Homebrew/gcc-7.1.0.tar.bz2

==> Downloading http_s://raw.githubusercontent.com/Homebrew/formula-patches/e9e0ee09389a54cc4c8fe1c24ebca3cd765ed0ba/gcc/6.1.0-jit.patch
Already downloaded: /Users/xxxx/Library/Caches/Homebrew/gcc--patch-863957f90a934ee8f89707980473769cff47ca0663c3906992da6afb242fb220.patch

==> Patching

==> Applying 6.1.0-jit.patch
patching file gcc/jit/Make-lang.in

==> ../configure --build=x86_64-apple-darwin17.0.0 --prefix=/usr/local/Cellar/gcc/7.1.0 --libdir=/usr/local/Cellar/gcc/7.1.0/lib/gcc/7 --e

==> make
 Last 15 lines from /Users/xxxx/Library/Logs/Homebrew/gcc/02.make:
/private/tmp/gcc-20170702-1460-1xbd0ht/gcc-7.1.0/build/x86_64-apple-darwin17.0.0/i386/libstdc++-v3/include/bits/stl_algobase.h:66:10: fatal error: bits/stl_iterator_base_funcs.h: No such file or directory

 #include 〈bits/stl_iterator_base_funcs.h〉

           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make[9]: *** [x86_64-apple-darwin17.0.0/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1

make[9]: *** Waiting for unfinished jobs....

make[8]: *** [all-recursive] Error 1

make[7]: *** [all] Error 2

make[6]: *** [multi-do] Error 1

make[5]: *** [all-multi] Error 2

make[4]: *** [all-recursive] Error 1

make[3]: *** [all] Error 2

make[2]: *** [all-stage3-target-libstdc++-v3] Error 2

make[1]: *** [stage3-bubble] Error 2

make: *** [all] Error 2


Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
gcc@4.6 formula seg faults on sierra http_s://github.com/Homebrew/homebrew-core/issues/15127

gcc: Hack version_suffix to fix --HEAD builds http_s://github.com/Homebrew/homebrew-core/pull/7642

gcc (7.1.0) does not automatically link libatomic with C11 code http_s://github.com/Homebrew/homebrew-core/issues/14633

Error: You are using macOS 10.13.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

Error: You are using macOS 10.13.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

最佳答案

“您可以 brew install --force-bottle foo 来解决您在构建时遇到的任何问题,它应该会倒出 Sierra 瓶。”,ilovezfs

https://github.com/Homebrew/homebrew-core/issues/14418

关于macos - 如何在 macOS 10.13 上安装 gcc@7?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44872882/

相关文章:

python - 无法在任何地方运行 jupyter(终端、anaconda 分发器)Mac os 10.12.6

xml - GhostScript 在 ImageMagick 中的文件路径

c++ - 为什么 gcc 链接器对 .a 文件和 .o 文件的行为不同?

python - 由于链接 gdbm 链接问题,Brew 安装 Python 失败

macos - 在 OSX 10.15 上安装和运行 emscripten

git - 无论是否使用 sudo,都无法在未以 root 身份登录的情况下克隆 github repo

c - __STDC_IEC_559__ 与现代 C 编译器的状态

c++ - 将 RxCpp 库添加到 cmake 项目中

postgresql - 数据目录 "/usr/local/var/postgres"的所有权错误

mongodb - 如何使用 Homebrew 软件安装早期版本的 mongodb?