【发布时间】:2014-04-22 01:09:07
【问题描述】:
我正在尝试让 Homebrew 安装 gcc49 (GCC 4.9)。具体来说,我是使用命令安装的,
brew install homebrew/versions/gcc49
但是,正常执行此操作时,我收到一条错误消息,提示我缺少gmp4。这就是奇怪的地方。
如果我再执行brew install homebrew/versions/gmp4,我会再次收到gmp4 丢失的通知。该库未安装。其他一些必需的库也会发生完全相同的事情。现在,我没有修复这种奇怪的行为,而是尝试运行
brew install homebrew/versions/gcc48 --with homebrew/versions/gmp4 --with homebrew/versions/libmpc08 --with homebrew/versions/mpfr2 --with homebrew/versions/cloog018 --with homebrew/versions/isl011
...导致
==> Installing dependencies for gcc48: gmp4, mpfr2, libmpc08, isl011, cloog018
==> Installing gcc48 dependency: gmp4
==> Downloading ftp://ftp.gmplib.org/pub/gmp/gmp-5.1.3.tar.bz2
######################################################################## 100.0%
==> Patching
patching file gmp-h.in
==> ./configure --prefix=/usr/local/Cellar/gmp/5.1.3 --enable-cxx
==> make
==> make check
==> make install
Error: Empty installation
最后一行让我很困惑。我从未见过我尝试安装的任何软件返回的问题 - 这是怎么回事,我该如何解决?
有趣的是,当我在具有相同 Homebrew 版本的桌面上尝试此操作时,只需运行 brew install gcc49 即可顺利安装 GCC 4.9,甚至无需通过 homebrew/versions。
【问题讨论】:
-
如果您先执行
brew tap homebrew/versions,然后执行brew install gcc49,会发生什么? -
@Pouya 您应该将此评论作为答案。它对我有用。谢谢!
-
@MattLong,我按照你的建议做了。很高兴它帮助
:)