【发布时间】:2014-03-22 04:40:32
【问题描述】:
我想在 Ubuntu Linux 上安装最新的gcc49,而我对 Mac 上的Homebrew 比较熟悉,所以我想使用它的 Linux 版本,即Linuxbrew。所以我安装了Linuxbrew 并输入了
$ brew install gcc49
首先安装依赖gmp4、mpfr2等。我在gmp4 中添加了if OS.mac? 条件,因此可以成功安装,但是在安装mpfr2(也添加了条件)时,make check 失败并出现错误:
...
/tmp/mpfr2-i5YD/mpfr-2.4.2/tests/.libs/lt-tpow_all: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory
FAIL: tpow_all
=======================
148 of 148 tests failed
=======================
如您所见,测试找不到刚刚安装的libgmp.so.3。但gmp4 只是桶,因为它会与主存储库中的 gmp 冲突。
但配置选项设置为gmp4的正确位置:
./configure --disable-dependency-tracking --prefix=/home/dongli/.linuxbrew/Cellar/mpfr2/2.4.2 --with-gmp=/home/dongli/.linuxbrew/opt/gmp4
如何解决这个问题?谢谢!
【问题讨论】:
标签: linux gcc homebrew mpfr linuxbrew