我正在尝试安装 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 版本的桌面上尝试此操作时,只需运行 GCC 4.9 即可顺利安装brew install gcc49
,甚至无需通过homebrew/versions
.