【问题标题】:Homebrew cannot install gccHomebrew 无法安装 gcc
【发布时间】:2019-01-28 23:42:09
【问题描述】:

我尝试通过自制软件获取 gcc。有一些奇怪的问题,所以我删除了自制软件并重新安装。重新安装成功,我按照这个:What is the best/safest way to reinstall Homebrew?

现在,我只需像往常一样输入brew install gcc,然后我得到:

brew install gcc
Warning: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this old version.

Warning: Your Xcode (7.2) is outdated.
Please update to Xcode 7.2.1 (or delete it).
Xcode can be updated from the App Store.

==> Installing dependencies for git: pcre2
==> Installing git dependency: pcre2
Warning: Your Xcode (7.2) is outdated.
Please update to Xcode 7.2.1 (or delete it).
Xcode can be updated from the App Store.

Updating Homebrew...
Error: An exception occurred within a child process:
  RuntimeError: The requested Homebrew GCC was not installed. You must:
  brew install gcc@6

Warning: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this old version.

Warning: Your Xcode (7.2) is outdated.
Please update to Xcode 7.2.1 (or delete it).
Xcode can be updated from the App Store.

==> Installing dependencies for gcc: gmp, isl, mpfr and libmpc
==> Installing gcc dependency: gmp
Warning: Your Xcode (7.2) is outdated.
Please update to Xcode 7.2.1 (or delete it).
Xcode can be updated from the App Store.

Error: An exception occurred within a child process:
  RuntimeError: The requested Homebrew GCC was not installed. You must:
  brew install gcc@6

所以,我也按照错误消息提示brew install gcc@6 然后我得到了

brew install gcc@6
Warning: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this old version.

Warning: Your Xcode (7.2) is outdated.
Please update to Xcode 7.2.1 (or delete it).
Xcode can be updated from the App Store.

==> Installing dependencies for git: pcre2
==> Installing git dependency: pcre2
Warning: Your Xcode (7.2) is outdated.
Please update to Xcode 7.2.1 (or delete it).
Xcode can be updated from the App Store.

Error: An exception occurred within a child process:
  RuntimeError: The requested Homebrew GCC was not installed. You must:
  brew install gcc@6

Updating Homebrew...
Warning: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this old version.

Warning: Your Xcode (7.2) is outdated.
Please update to Xcode 7.2.1 (or delete it).
Xcode can be updated from the App Store.

==> Installing dependencies for gcc@6: gmp, isl, mpfr and libmpc
==> Installing gcc@6 dependency: gmp
Warning: Your Xcode (7.2) is outdated.
Please update to Xcode 7.2.1 (or delete it).
Xcode can be updated from the App Store.

Error: An exception occurred within a child process:
  RuntimeError: The requested Homebrew GCC was not installed. You must:
  brew install gcc@6

这是递归的。我对这个问题的猜测可能是我使用的 OSX 版本太旧? (10.10 优胜美地)。

我应该获取最新版本的 OSX 以获得正确的 brew 功能吗?如果您有任何想法,请告诉我。

谢谢

【问题讨论】:

    标签: gcc homebrew


    【解决方案1】:

    如消息所述,Homebrew 不支持您的 macOS 版本,并且您的 Xcode 已过时。

    如果一切正常,则可以使用不受支持的 macOS。但是,过时的 Xcode 会阻止一切。

    如果可以,请更新您的 Xcode 并重试。如果它仍然不起作用,您将不得不更新您的 macOS。

    【讨论】:

      猜你喜欢
      • 2013-08-05
      • 1970-01-01
      • 2017-11-16
      • 2011-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-11
      相关资源
      最近更新 更多