我想在Ubuntu Linux上安装最新的gcc49
,并且我在Mac中熟悉Homebrew
,所以我想使用Linux的版本,即Linuxbrew
。所以我安装了Linuxbrew
并输入
$ brew install gcc49
依赖项
gmp4
,mpfr2
等将首先安装。我在if OS.mac?
中添加了gmp4
条件,因此可以成功安装,但是在安装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
如何解决这个问题呢?谢谢!
最佳答案
您认为坚持使用非操作系统本身的第三方脚本解决方案是错的。
this PPA on Launchpad中的相同维护者提供了gcc等人的预构建版本。这些是下一个Ubuntu版本中的预览/测试版本。
关于linux - 使用linuxbrew在Ubuntu中安装gcc49时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22573550/