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

3
我使用homebrew在macOS 10.13高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.

请查看最后给出的错误信息。 - cello
1个回答

4

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接